Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar

This commit is contained in:
Marco Pesenti Gritti 2007-10-03 23:57:32 +02:00
commit acca55e861
2 changed files with 13 additions and 1 deletions

View File

@ -60,8 +60,14 @@ class DSMetadata(gobject.GObject):
def __delitem__(self, key):
del self._props[key]
def __contains__(self, key):
return self._props.__contains__(key)
def has_key(self, key):
return self._props.has_key(key)
def keys(self):
return self._props.keys()
def get_dictionary(self):
return self._props
@ -69,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

View File

@ -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)