From 465e0c1dc13e0a989578cfb93e977bc326b2fd86 Mon Sep 17 00:00:00 2001 From: Stas Fomin Date: Fri, 11 Dec 2015 22:16:37 +0300 Subject: [PATCH] =?UTF-8?q?Obvious=20error=20=E2=80=94=20incorrect=20conne?= =?UTF-8?q?ction=20string,=20lost=20port=20information.=20And=20port=20sho?= =?UTF-8?q?uld=20be=20set=20even=20for=20localhost?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pylib/dbx_psycopg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylib/dbx_psycopg.py b/pylib/dbx_psycopg.py index c38db0a..b61af44 100644 --- a/pylib/dbx_psycopg.py +++ b/pylib/dbx_psycopg.py @@ -102,8 +102,8 @@ def getConnectionString(self): parts.append("password='%s'" % self.password) if self.host and self.host != 'localhost': parts.append("host='%s'" % self.host) - if self.password: - parts.append("password='%s'" % self.password) + if self.port: + parts.append("port='%s'" % self.port) return " ".join(parts) def getConnectionDisplayValues(self):