diff options
author | Benjamin Saller <bcsaller@objectrealms.net> | 2007-07-16 15:16:28 (GMT) |
---|---|---|
committer | Benjamin Saller <bcsaller@objectrealms.net> | 2007-07-16 15:16:28 (GMT) |
commit | 0e1df235572599b6272ea1b5889ec60c3f519add (patch) | |
tree | 7e4a4cf3777b659c3dad35d299dc26c818d90245 | |
parent | ab458ba8b5ee1c90893255489edcace7953ad62b (diff) |
remove mountpoint from update arguments at the lower level
though datastore.get() returns the object from a given mountpoint
it would be better to clear up the handling here and handle the explicit case better
its unclear that mountpoint makes sense on create but update updates the object inplace
-rwxr-xr-x | bin/datastore-service | 4 | ||||
-rw-r--r-- | src/olpc/datastore/datastore.py | 1 | ||||
-rw-r--r-- | src/olpc/datastore/model.py | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/bin/datastore-service b/bin/datastore-service index 532516b..b8555ee 100755 --- a/bin/datastore-service +++ b/bin/datastore-service @@ -6,8 +6,6 @@ import dbus.mainloop.glib from olpc.datastore import DataStore, DS_LOG_CHANNEL, backingstore import logging -SYNC_INDEX = True - # Path handling profile = os.environ.get('SUGAR_PROFILE', 'default') base_dir = os.path.join(os.path.expanduser('~'), '.sugar', profile) @@ -50,7 +48,7 @@ bus = dbus.SessionBus() ds = DataStore() ds.registerBackend(backingstore.FileBackingStore) ds.registerBackend(backingstore.InplaceFileBackingStore) -ds.mount(repo_dir, {'indexmanager.sync_index': SYNC_INDEX}) +ds.mount(repo_dir) # and run it logger.info("Starting Datastore %s" % (repo_dir)) diff --git a/src/olpc/datastore/datastore.py b/src/olpc/datastore/datastore.py index bc7e333..56b55ac 100644 --- a/src/olpc/datastore/datastore.py +++ b/src/olpc/datastore/datastore.py @@ -376,6 +376,7 @@ class DataStore(dbus.service.Object): example. You must create it """ content = self.get(uid) + mountpoint = props.pop('mountpoint', None) content.backingstore.update(uid, props, filelike) if filelike: self.Updated(content.id) diff --git a/src/olpc/datastore/model.py b/src/olpc/datastore/model.py index ccbf396..fbad65f 100644 --- a/src/olpc/datastore/model.py +++ b/src/olpc/datastore/model.py @@ -311,7 +311,7 @@ registerPropertyType('number', str, float, 'float', {'store' : True, registerPropertyType('date', dateenc, datedec, 'float', {'store' : True, 'exact' : True, 'sortable' : True - }, + }, for_xapian=encode_datetime, from_xapain=decode_datetime) |