From cdadcbe045db5a66cf71b749a9613b901b4316f8 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 17 Aug 2015 09:55:05 +0000 Subject: reproducible: common.py: use the keyword syntax instead of libpq string to connect to udd --- bin/reproducible_common.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bin/reproducible_common.py') diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 8eae0950..e51afd7c 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -321,10 +321,12 @@ def start_udd_connection(): db = "udd" try: log.debug("Starting connection to the UDD database") - conn = psycopg2.connect("dbname=" + db + - " user=" + username + - " host=" + host + - " password=" + password) + conn = psycopg2.connect( + database=db, + user=username, + host=host, + password=password + ) except: log.error('Erorr connecting to the UDD database replica.' + 'The full error is:') -- cgit v1.2.3-70-g09d2