From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D7436138A9F for ; Sat, 25 Jan 2014 15:42:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6D253E0AB3; Sat, 25 Jan 2014 15:42:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 12EC0E0AB3 for ; Sat, 25 Jan 2014 15:42:41 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3D38B33F65A for ; Sat, 25 Jan 2014 15:42:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by flycatcher.gentoo.org (Postfix) with ESMTP id D11E120034 for ; Sat, 25 Jan 2014 15:42:38 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: <1390664554.c81df5fa5a67876dd77cc36aaef7504b2af1c171.idl0r@gentoo> Subject: [gentoo-commits] packages:master commit in: dbgenerator/ X-VCS-Repository: packages X-VCS-Files: dbgenerator/database.py X-VCS-Directories: dbgenerator/ X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: c81df5fa5a67876dd77cc36aaef7504b2af1c171 X-VCS-Branch: master Date: Sat, 25 Jan 2014 15:42:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f758cde1-8592-4eac-9cf3-44ad6ae52277 X-Archives-Hash: c58fa625bee014b68a2ef056b0b7e3c4 commit: c81df5fa5a67876dd77cc36aaef7504b2af1c171 Author: Christian Ruppert gentoo org> AuthorDate: Sat Jan 25 15:42:34 2014 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Sat Jan 25 15:42:34 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=packages.git;a=commit;h=c81df5fa Fix schema check for MySQL --- dbgenerator/database.py | 5 ++--- 1 file 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: