aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2014-01-25 16:42:34 +0100
committerChristian Ruppert <idl0r@gentoo.org>2014-01-25 16:42:34 +0100
commitc81df5fa5a67876dd77cc36aaef7504b2af1c171 (patch)
treeca29b59189e12b5b40c8d6187fdfef861d866fcf /dbgenerator
parentBump schema to add the arm64 arch (diff)
downloadpackages-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.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: