diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-06-26 12:46:09 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-06-26 12:46:09 (GMT) |
commit | b569ce0d8f1e587e91b9b058ee3e6a087bf9cbd2 (patch) | |
tree | ea5fae22fd8c0100d17b83e9e845b390e4d48874 | |
parent | 569faeba315c303542791215d63bc5391b4bebea (diff) |
Don't include in find() results entries without metadata
-rw-r--r-- | src/carquinyol/datastore.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/carquinyol/datastore.py b/src/carquinyol/datastore.py index a118e03..71c8a4a 100644 --- a/src/carquinyol/datastore.py +++ b/src/carquinyol/datastore.py @@ -215,8 +215,11 @@ class DataStore(dbus.service.Object): entries = [] for uid in uids: - metadata = self._metadata_store.retrieve(uid, properties) - entries.append(metadata) + if os.path.exists(layoutmanager.get_instance().get_entry_path(uid)): + metadata = self._metadata_store.retrieve(uid, properties) + entries.append(metadata) + else: + logging.debug('Skipping entry %r without metadata dir' % uid) logger.debug('find(): %r' % (time.time() - t)) return entries, count |