From 738c2100758625bdc9473caf3177a8a896260d52 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 30 Mar 2010 11:21:26 +0000 Subject: [PATCH] update --- lib/core/common.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 3d127bd23..5e0fb9d9c 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -606,20 +606,25 @@ def parseTargetDirect(): details = None for dbms in SUPPORTED_DBMS: - details = re.search("^(?P%s)://(?P(?P.+?)\:(?P.+?)\@(?P.+?)\:(?P[\d]+)\/)?(?P.+?)$" % dbms, conf.direct, re.I) + details = re.search("^(?P%s)://(?P(?P.+?)\:(?P.+?)\@)(?P(?P.+?)\:(?P[\d]+)\/)?(?P.+?)$" % dbms, conf.direct, re.I) if details: conf.dbms = details.group('dbms') - if details.group('optional'): + + if details.group('credentials'): conf.dbmsUser = details.group('dbmsUser') conf.dbmsPass = details.group('dbmsPass') - conf.hostname = details.group('hostname') - conf.port = int(details.group('port')) else: conf.dbmsUser = str() conf.dbmsPass = str() + + if details.group('remote'): + conf.hostname = details.group('hostname') + conf.port = int(details.group('port')) + else: conf.hostname = "localhost" - conf.port = 0 + conf.port = 0 + conf.dbmsDb = details.group('dbmsDb') conf.parameters[None] = "direct connection"