diff --git a/sugar/datastore/datastore.py b/sugar/datastore/datastore.py index a5ac3d0e..0a7be50d 100644 --- a/sugar/datastore/datastore.py +++ b/sugar/datastore/datastore.py @@ -75,6 +75,12 @@ class DSMetadata(gobject.GObject): def copy(self): return DSMetadata(self._props.copy()) + def get(self, key, default=None): + if self._props.has_key(key): + return self._props[key] + else: + return default + class DSObject(object): def __init__(self, object_id, metadata=None, file_path=None): self.object_id = object_id diff --git a/sugar/datastore/dbus_helpers.py b/sugar/datastore/dbus_helpers.py index b0b636c7..a10feec8 100644 --- a/sugar/datastore/dbus_helpers.py +++ b/sugar/datastore/dbus_helpers.py @@ -75,7 +75,7 @@ def get_filename(uid): return filename def find(query, properties, reply_handler, error_handler): - logging.debug('dbus_helpers.find: %r' % query) + logging.debug('dbus_helpers.find: %r %r' % (query, properties)) if reply_handler and error_handler: return _get_data_store().find(query, properties, reply_handler=reply_handler, error_handler=error_handler)