From 1f1626eaa5ae67f461d38d07e54fb3dba51b314a Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Wed, 23 Mar 2011 17:51:31 +0000 Subject: [PATCH] Fix dak update-db --- dak/update_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dak/update_db.py b/dak/update_db.py index 3effa477..b2ca7a86 100755 --- a/dak/update_db.py +++ b/dak/update_db.py @@ -123,7 +123,7 @@ Updates dak's database schema to the lastest version. You should disable crontab try: # Build a connect string - if cnf["DB::Service"]: + if cnf.has_key("DB::Service"): connect_str = "service=%s" % cnf["DB::Service"] else: connect_str = "dbname=%s"% (cnf["DB::Name"]) @@ -134,7 +134,7 @@ Updates dak's database schema to the lastest version. You should disable crontab except: print "FATAL: Failed connect to database" - pass + sys.exit(1) database_revision = int(self.get_db_rev()) logger.log(['transaction id before update: %s' % self.get_transaction_id()]) -- 2.39.5