X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fupdate_db.py;h=77d0097604743c40191da00bf970c11b8b0c90ec;hb=677028bf7a3cac6ebf910f9e39a88360f0a4a6d7;hp=424359a384c807b95247aa2f01f06828330aa24b;hpb=272a832d3fcc643626e863388921ee29c2110ee5;p=dak.git diff --git a/dak/update_db.py b/dak/update_db.py index 424359a3..77d00976 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()])