aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2014-01-25 15:42:34 (GMT)
committerChristian Ruppert <idl0r@gentoo.org>2014-01-25 15:42:34 (GMT)
commitc81df5fa5a67876dd77cc36aaef7504b2af1c171 (patch)
treeca29b59189e12b5b40c8d6187fdfef861d866fcf
parentBump schema to add the arm64 arch (diff)
downloadpackages-c81df5fa5a67876dd77cc36aaef7504b2af1c171.zip
packages-c81df5fa5a67876dd77cc36aaef7504b2af1c171.tar.gz
packages-c81df5fa5a67876dd77cc36aaef7504b2af1c171.tar.bz2
Fix schema check for MySQL
-rw-r--r--dbgenerator/database.py5
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: