mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-25 10:01:26 -04:00
- also correct for dbapi is a Mock without __version__...
Change-Id: I9e6b61a3292a2a6c8bb281c2375f2326282bcb76
This commit is contained in:
@@ -88,7 +88,8 @@ class MySQLDialect_mysqldb(MySQLDialect):
|
||||
super(MySQLDialect_mysqldb, self).__init__(**kwargs)
|
||||
self.server_side_cursors = server_side_cursors
|
||||
self._mysql_dbapi_version = self._parse_dbapi_version(
|
||||
self.dbapi.__version__) if self.dbapi is not None else (0, 0, 0)
|
||||
self.dbapi.__version__) if self.dbapi is not None \
|
||||
and hasattr(self.dbapi, '__version__') else (0, 0, 0)
|
||||
|
||||
def _parse_dbapi_version(self, version):
|
||||
m = re.match(r'(\d+)\.(\d+)(?:\.(\d+))?', version)
|
||||
|
||||
Reference in New Issue
Block a user