From 66ee800ec6e40c843eff67ff702d486c776bee6e Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Mon, 28 May 2012 14:02:12 -0500 Subject: [PATCH] yet another postgresql connection improvement, thanks Babak --- VERSION | 2 +- gluon/dal.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index f8990476..5df7799c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-05-28 13:37:41) dev +Version 2.00.0 (2012-05-28 14:01:46) dev diff --git a/gluon/dal.py b/gluon/dal.py index 4e9fa214..5041a362 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2054,7 +2054,7 @@ class MySQLAdapter(BaseAdapter): self.db_codec = db_codec self.find_or_make_work_folder() uri = uri.split('://')[1] - m = re.compile('^(?P[^:@]+)(\:(?P[^@]*))?@(?P[^\:/]+)(\:(?P[0-9]+))?/(?P[^?]+)(\?set_encoding=(?P\w+))?$').match(uri) + m = re.compile('^(?P[^:@]+)(\:(?P[^@]*))?@(?P[^\:/]+)(\:(?P[0-9]+))?/+(?P[^?]+)(\?set_encoding=(?P\w+))?$').match(uri) if not m: raise SyntaxError, \ "Invalid URI string in DAL: %s" % self.uri @@ -2173,7 +2173,7 @@ class PostgreSQLAdapter(BaseAdapter): self.srid = srid self.find_or_make_work_folder() library, uri = uri.split('://')[:2] - m = re.compile('^(?P[^:@]+)(\:(?P[^@]*))?@(?P[^\:@]+)(\:(?P[0-9]+))?/(?P[^\?]+)(\?sslmode=(?P.+))?$').match(uri) + m = re.compile('^(?P[^:@]+)(\:(?P[^@]*))?@(?P[^\:@]+)(\:(?P[0-9]+))?/+(?P[^\?]+)(\?sslmode=(?P.+))?$').match(uri) if not m: raise SyntaxError, "Invalid URI string in DAL" user = credential_decoder(m.group('user'))