fixed postgresql uri bug
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.3 (2012-08-30 23:55:09) stable
|
Version 2.0.3 (2012-08-31 00:11:28) stable
|
||||||
|
|||||||
+5
-4
@@ -2408,6 +2408,7 @@ class PostgreSQLAdapter(BaseAdapter):
|
|||||||
self.db_codec = db_codec
|
self.db_codec = db_codec
|
||||||
self.srid = srid
|
self.srid = srid
|
||||||
self.find_or_make_work_folder()
|
self.find_or_make_work_folder()
|
||||||
|
uri = uri.split('://')[:2]
|
||||||
m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:@]+)(\:(?P<port>[0-9]+))?/(?P<db>[^\?]+)(\?sslmode=(?P<sslmode>.+))?$').match(uri)
|
m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:@]+)(\:(?P<port>[0-9]+))?/(?P<db>[^\?]+)(\?sslmode=(?P<sslmode>.+))?$').match(uri)
|
||||||
if not m:
|
if not m:
|
||||||
raise SyntaxError, "Invalid URI string in DAL"
|
raise SyntaxError, "Invalid URI string in DAL"
|
||||||
@@ -3936,10 +3937,10 @@ class GoogleSQLAdapter(UseDatabaseStoredFile,MySQLAdapter):
|
|||||||
self.db_codec = db_codec
|
self.db_codec = db_codec
|
||||||
self.folder = folder or pjoin('$HOME',thread.folder.split(
|
self.folder = folder or pjoin('$HOME',thread.folder.split(
|
||||||
os.sep+'applications'+os.sep,1)[1])
|
os.sep+'applications'+os.sep,1)[1])
|
||||||
|
uri = uri.split("://")[1]
|
||||||
m = re.compile('^(?P<instance>.*)/(?P<db>.*)$').match(self.uri[len('google:sql://'):])
|
m = re.compile('^(?P<instance>.*)/(?P<db>.*)$').match(uri)
|
||||||
if not m:
|
if not m:
|
||||||
raise SyntaxError, "Invalid URI string in SQLDB: %s" % self._uri
|
raise SyntaxError, "Invalid URI string in SQLDB: %s" % uri
|
||||||
instance = credential_decoder(m.group('instance'))
|
instance = credential_decoder(m.group('instance'))
|
||||||
self.dbstring = db = credential_decoder(m.group('db'))
|
self.dbstring = db = credential_decoder(m.group('db'))
|
||||||
driver_args['instance'] = instance
|
driver_args['instance'] = instance
|
||||||
@@ -5478,7 +5479,6 @@ class IMAPAdapter(NoSQLAdapter):
|
|||||||
# db uri: user@example.com:password@imap.server.com:123
|
# db uri: user@example.com:password@imap.server.com:123
|
||||||
# TODO: max size adapter argument for preventing large mail transfers
|
# TODO: max size adapter argument for preventing large mail transfers
|
||||||
|
|
||||||
uri = uri.split("://")[1]
|
|
||||||
self.db = db
|
self.db = db
|
||||||
self.uri = uri
|
self.uri = uri
|
||||||
self.find_driver(adapter_args)
|
self.find_driver(adapter_args)
|
||||||
@@ -5492,6 +5492,7 @@ class IMAPAdapter(NoSQLAdapter):
|
|||||||
self.charset = sys.getfilesystemencoding()
|
self.charset = sys.getfilesystemencoding()
|
||||||
# imap class
|
# imap class
|
||||||
self.imap4 = None
|
self.imap4 = None
|
||||||
|
uri = uri.split("://")[1]
|
||||||
|
|
||||||
""" MESSAGE is an identifier for sequence number"""
|
""" MESSAGE is an identifier for sequence number"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user