[Trac #1452] DataStore.get_properties() method should return a dictionary of variants
Zarro Boogs per Child
bugtracker at laptop.org
Thu May 10 12:02:21 EDT 2007
#1452: DataStore.get_properties() method should return a dictionary of variants
-----------------------+----------------------------------------------------
Reporter: tomeu | Owner: tomeu
Type: defect | Status: new
Priority: normal | Milestone: Untriaged
Component: datastore | Version:
Keywords: |
-----------------------+----------------------------------------------------
Also, we need to serialize somehow the dates as valid DBus types.
{{{
--- a/src/olpc/datastore/datastore.py
+++ b/src/olpc/datastore/datastore.py
@@ -148,17 +148,19 @@ class DataStore(dbus.service.Object):
@dbus.service.method(_DS_DBUS_INTERFACE,
in_signature='s',
- out_signature='a{ss}')
+ out_signature='a{sv}')
def get_properties(self, uid):
content = self.get(uid)
if content:
- return content.get_properties()
-
+ dictionary = {}
+ for prop in content.get_properties():
+ if prop.key != 'ctime' and prop.key != 'mtime':
+ dictionary[prop.key] = prop.value
+ return dictionary
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/1452>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list