#1833 NORM Trial-2: datastore chokes on dbus.String parameters
Zarro Boogs per Child
bugtracker at laptop.org
Wed Jun 27 16:46:03 EDT 2007
#1833: datastore chokes on dbus.String parameters
-----------------------+----------------------------------------------------
Reporter: tomeu | Owner: bcsaller
Type: defect | Status: new
Priority: normal | Milestone: Trial-2
Component: datastore | Version:
Keywords: | Verified: 0
-----------------------+----------------------------------------------------
Have needed to do the following in order for DataStore to accept the
strings passed through dbus:
{{{
diff --git a/src/olpc/datastore/datastore.py
b/src/olpc/datastore/datastore.py
index 72f5f0b..06d5b45 100644
--- a/src/olpc/datastore/datastore.py
+++ b/src/olpc/datastore/datastore.py
@@ -64,8 +64,16 @@ class DataStore(dbus.service.Object):
# medium (maybe an SD card for example) and we'd want to keep
# that on the XO itself. In these cases their might be very
# little identifying information on the media itself.
- if not options: options = {}
- mp = self.connect_backingstore(uri, **options)
+
+ uri = str(uri)
+
+ _options = {}
+ if options:
+ for key, value in options.iteritems():
+ _options[str(key)] = str(value)
+
+ mp = self.connect_backingstore(uri, **_options)
if not mp: return ''
if mp.id in self.mountpoints:
self.mountpoints[mp.id].stop()
}}}
Not pretty but illustrative.
--
Ticket URL: <http://dev.laptop.org/ticket/1833>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list