Correctly handle port in connection strings.

This commit is contained in:
adustman
2001-04-12 01:26:28 +00:00
parent 959c832fa3
commit 4a8a2104a1

View File

@@ -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