fixed issue 1336 again

This commit is contained in:
mdipierro
2013-02-16 10:00:35 -06:00
parent 954e84db3c
commit be2ef9b626
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.1-alpha.2+timestamp.2013.02.16.09.31.05
Version 2.4.1-alpha.2+timestamp.2013.02.16.09.59.52
+2 -4
View File
@@ -145,6 +145,7 @@ SPATIALLIBS = {
'Linux':'libspatialite.so',
'Darwin':'libspatialite.dylib'
}
DEFAULT_URI = 'sqlite://dummy.db'
import re
import sys
@@ -7156,7 +7157,7 @@ class DAL(object):
db._adapter.commit_prepared(keys[i])
return
def __init__(self, uri=None,
def __init__(self, uri=DEFAULT_URI,
pool_size=0, folder=None,
db_codec='UTF-8', check_reserved=None,
migrate=True, fake_migrate=False,
@@ -7199,7 +7200,6 @@ class DAL(object):
:after_connection (defaults to None): a callable that will be execute after the connection
"""
DEFAULT_URI = 'sqlite://dummy.db'
items = None
if isinstance(uri, dict):
if "items" in uri:
@@ -7210,8 +7210,6 @@ class DAL(object):
newuri = DEFAULT_URI
locals().update(uri)
uri = newuri
elif not uri:
uri = DEFAULT_URI
if uri == '<zombie>' and db_uid is not None: return
if not decode_credentials: