diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2014-01-25 16:42:34 +0100 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2014-01-25 16:42:34 +0100 |
commit | c81df5fa5a67876dd77cc36aaef7504b2af1c171 (patch) | |
tree | ca29b59189e12b5b40c8d6187fdfef861d866fcf /dbgenerator | |
parent | Bump schema to add the arm64 arch (diff) | |
download | packages-3-c81df5fa5a67876dd77cc36aaef7504b2af1c171.tar.gz packages-3-c81df5fa5a67876dd77cc36aaef7504b2af1c171.tar.bz2 packages-3-c81df5fa5a67876dd77cc36aaef7504b2af1c171.zip |
Fix schema check for MySQL
Diffstat (limited to 'dbgenerator')
-rw-r--r-- | dbgenerator/database.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dbgenerator/database.py b/dbgenerator/database.py index 346dd41..6bb0269 100644 --- a/dbgenerator/database.py +++ b/dbgenerator/database.py @@ -558,14 +558,13 @@ class SQLPackageDatabase(object): if entries is not None: current_schema = entries[0][0] result = (current_schema == self.schema_version) - detected_version = current_schema except IndexError: pass except self.db.OperationalError: pass except self.db.ProgrammingError: pass - return (result, detected_version) + return (result, current_schema) def _preparesql(self): """Prepare all SQL statements for the relevant DB backend""" @@ -660,7 +659,7 @@ class MySQLPackageDB(SQLPackageDatabase): self.initdb = False self._preparesql() - if not self.schema_is_current(): + if not self.schema_is_current()[0]: print 'Schema is outdated, flushing!' self.initdb = True if self.initdb: |