From 4a8a2104a13f8764393e87ea1fac2e05c0084eae Mon Sep 17 00:00:00 2001 From: adustman Date: Thu, 12 Apr 2001 01:26:28 +0000 Subject: [PATCH] Correctly handle port in connection strings. --- ZMySQLDA/lib/python/Products/ZMySQLDA/db.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py b/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py index c749d6c..0d86872 100644 --- a/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py +++ b/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py @@ -168,11 +168,9 @@ class DB(TM): db, host = split(db_host,'@',1) kwargs['db'] = db if ':' in host: - host, port = split(db_host,':',1) - kwargs['host'] = host + host, port = split(host,':',1) kwargs['port'] = int(port) - else: - kwargs['host'] = host + kwargs['host'] = host else: kwargs['db'] = db_host if not items: return kwargs