From 8fa8c79aa65d33a1d6866c06dc91779453366415 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 3 Dec 2012 14:47:08 +0100 Subject: [PATCH] added debug statements --- sfa/managers/registry_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sfa/managers/registry_manager.py b/sfa/managers/registry_manager.py index e921d6ef..a3678201 100644 --- a/sfa/managers/registry_manager.py +++ b/sfa/managers/registry_manager.py @@ -215,6 +215,7 @@ class RegistryManager: record_dicts = record_list # if we still have not found the record yet, try the local registry + logger.debug("before trying local records, %d foreign records"% len(record_dicts)) if not record_dicts: recursive = False if ('recursive' in options and options['recursive']): @@ -226,9 +227,11 @@ class RegistryManager: if not api.auth.hierarchy.auth_exists(hrn): raise MissingAuthority(hrn) if recursive: - records = dbsession.query(RegRecord).filter(RegRecord.hrn.startswith(hrn)) + records = dbsession.query(RegRecord).filter(RegRecord.hrn.startswith(hrn)).all() + logger.debug("recursive mode, found %d local records"%(len(records))) else: - records = dbsession.query(RegRecord).filter_by(authority=hrn) + records = dbsession.query(RegRecord).filter_by(authority=hrn).all() + logger.debug("non recursive mode, found %d local records"%(len(records))) # so that sfi list can show more than plain names... for record in records: augment_with_sfa_builtins (record) record_dicts=[ record.todict(exclude_types=[InstrumentedList]) for record in records ] -- 2.47.0