Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2008-11-28 18:58:47 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2008-11-28 18:58:47 (GMT)
commit8ff0a36a6c271f00a61159b592011b02d68a03ad (patch)
treebf6296cdcfecfba5b35b7db6f5e1b89eda2ab71c /src
parentb006cfdd12d5f22ccea35ab4f716350058cdf107 (diff)
Implement delete and get_unique_values
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/journal/model.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 4e23533..f221ced 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -277,12 +277,16 @@ def get_file(object_id):
def get_unique_values(key):
"""Returns a list with the different values a property has taken
"""
- return []
+ empty_dict = dbus.Dictionary({}, signature='ss')
+ return _get_datastore().get_uniquevaluesfor(key, empty_dict)
def delete(object_id):
"""Removes an object from persistent storage
"""
- pass
+ if os.path.exists(object_id):
+ os.unlink(object_id)
+ else:
+ _get_datastore().delete(object_id)
def copy(metadata, mount_point):
"""Copies an object to another mount point