[Trac #1462] cannot create an object without a file name
Zarro Boogs per Child
bugtracker at laptop.org
Sat May 12 04:55:14 EDT 2007
#1462: cannot create an object without a file name
-----------------------+----------------------------------------------------
Reporter: tomeu | Owner: bcsaller
Type: defect | Status: new
Priority: normal | Milestone: Untriaged
Component: datastore | Version:
Keywords: |
-----------------------+----------------------------------------------------
If I create with the DataStore D-Bus service an entry with a file name of
"" (as None cannot be passed through D-Bus), python complains that a
string doesn't have a seek() method.
Possible fix:
{{{
--- a/src/olpc/datastore/datastore.py
+++ b/src/olpc/datastore/datastore.py
@@ -115,7 +115,7 @@ class DataStore(dbus.service.Object):
t = filelike.tell()
content = self.querymanager.create(props, filelike)
- if filelike is not None:
+ if filelike:
filelike.seek(t)
self.backingstore.create(content, filelike)
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/1462>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list