From: Ansgar Burchardt Date: Wed, 23 Mar 2011 17:51:31 +0000 (+0000) Subject: Fix dak update-db X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1f1626eaa5ae67f461d38d07e54fb3dba51b314a;p=dak.git Fix dak update-db --- 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()])