From be2ef9b62628756ad8eeaa0ef1dae28332f9f8cc Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 16 Feb 2013 10:00:35 -0600 Subject: [PATCH] fixed issue 1336 again --- VERSION | 2 +- gluon/dal.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index ce37a54c..5dec942e 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/dal.py b/gluon/dal.py index 2177545a..d1e5a2a6 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -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 == '' and db_uid is not None: return if not decode_credentials: