From: Mike O'Connor Date: Wed, 28 Oct 2009 19:51:22 +0000 (+0000) Subject: undoing some changes I shouldn't have made X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=11edf9c1ed3b718c022f81fa10085d1c78774e9e undoing some changes I shouldn't have made --- diff --git a/dak/update_db.py b/dak/update_db.py index a51c7c1b..88d8e4e6 100755 --- a/dak/update_db.py +++ b/dak/update_db.py @@ -107,10 +107,9 @@ Updates dak's database schema to the lastest version. You should disable crontab try: # Build a connect string -# connect_str = "dbname=%s"% (Cnf["DB::Name"]) - connect_str = "dbname=%s"% "projectbstew" -# if Cnf["DB::Host"] != '': connect_str += " host=%s" % (Cnf["DB::Host"]) -# if Cnf["DB::Port"] != '-1': connect_str += " port=%d" % (int(Cnf["DB::Port"])) + connect_str = "dbname=%s"% (Cnf["DB::Name"]) + if Cnf["DB::Host"] != '': connect_str += " host=%s" % (Cnf["DB::Host"]) + if Cnf["DB::Port"] != '-1': connect_str += " port=%d" % (int(Cnf["DB::Port"])) self.db = psycopg2.connect(connect_str)