Skip to content

Commit

Permalink
Merge branch 'sqlcommenting-mysql-driver' into mysqlclient-sqlcomment
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi committed Oct 16, 2024
2 parents c9c0dc5 + 4e6ab3f commit 637b95b
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,20 @@ def calculate_commenter_data(
if not self.enable_commenter:
return commenter_data

db_driver = self.connect_module.__name__
try:
db_driver = self.connect_module.__name__
except AttributeError:
db_driver = "unknown"

db_version = ""
if db_driver in _DB_DRIVER_ALIASES:
db_version = util_version(_DB_DRIVER_ALIASES[db_driver])
else:
db_version = self.connect_module.__version__
try:
db_version = self.connect_module.__version__
except AttributeError:
db_driver = "unknown"

commenter_data = {
"db_driver": f"{db_driver}:{db_version.split(' ')[0]}",
"dbapi_threadsafety": self.connect_module.threadsafety,
Expand Down

0 comments on commit 637b95b

Please sign in to comment.