X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fupdate_db.py;h=a0b091a50f65b8b8ddff417de58f6b4e1d624b94;hb=1149b8e288d45a56c61b7d3804e25fd33de4f27a;hp=3effa47741362500138fd6a18df0b8821837b362;hpb=80bfccee962f87de3a79b6182546ac03beba6dbb;p=dak.git diff --git a/dak/update_db.py b/dak/update_db.py index 3effa477..a0b091a5 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 = 57 ################################################################################ @@ -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()])