X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fupdate_db.py;h=88ff20f52c1e842bb025da4213349c1d013020bc;hb=be1cb05f94229e2ea8e1dbc4322709117ae41fc5;hp=3effa47741362500138fd6a18df0b8821837b362;hpb=b8690d6b1256a4a95198b874d9eb1aab62a825fb;p=dak.git diff --git a/dak/update_db.py b/dak/update_db.py index 3effa477..88ff20f5 100755 --- a/dak/update_db.py +++ b/dak/update_db.py @@ -46,7 +46,7 @@ from daklib.daklog import Logger ################################################################################ Cnf = None -required_database_schema = 48 +required_database_schema = 54 ################################################################################ @@ -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()])