From fb9ad028f829427d9bf1c1631b5f58d8349fdc17 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 11 Nov 2013 10:16:38 -0600 Subject: [PATCH] fixed problem with multiple uris and lazy tables --- VERSION | 2 +- gluon/dal.py | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/VERSION b/VERSION index 12453fd8..7511901f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.7.4-stable+timestamp.2013.11.11.09.39.55 +Version 2.7.4-stable+timestamp.2013.11.11.10.15.42 diff --git a/gluon/dal.py b/gluon/dal.py index 84527d0f..6005634b 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -7588,13 +7588,12 @@ class DAL(object): for db in db_group: if not db._uri: continue - k = hide_password(db._uri) - infos[k] = dict(dbstats = [(row[0], row[1]) for row in db._timings], - dbtables = {'defined': - sorted(list(set(db.tables) - - set(db._LAZY_TABLES.keys()))), - 'lazy': sorted(db._LAZY_TABLES.keys())} - ) + k = hide_password(db._adapter.uri) + infos[k] = dict( + dbstats = [(row[0], row[1]) for row in db._timings], + dbtables = {'defined': sorted( + list(set(db.tables)-set(db._LAZY_TABLES.keys()))), + 'lazy': sorted(db._LAZY_TABLES.keys())}) return infos @staticmethod @@ -8248,7 +8247,7 @@ def index(): def __repr__(self): if hasattr(self,'_uri'): - return '' % hide_password(str(self._uri)) + return '' % hide_password(self._adapter.uri) else: return '' % self._db_uid