X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fupdate_db.py;h=b2ca7a86b7af90fa898241bdb6307006866a5960;hb=1f1626eaa5ae67f461d38d07e54fb3dba51b314a;hp=3effa47741362500138fd6a18df0b8821837b362;hpb=76467b7e0ddd35e882cf8ac0ddf3b56c3739315b;p=dak.git 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()])