Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-05-10 12:16:48 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-05-10 12:16:48 (GMT)
commit30114f9545f2a95ac5935e92e377896d557abb23 (patch)
treeef8495efdbfa07839df8b1705272c97c6ec82f58 /sugar
parent46eea8fc7f5e8d6973db0f78ab8c9a09ce44e614 (diff)
Temporary try..excepts while we stabilize the new datastore.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/activity.py5
-rw-r--r--sugar/datastore/dbus_helpers.py8
2 files changed, 10 insertions, 3 deletions
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py
index 809b61a..fcbccc3 100644
--- a/sugar/activity/activity.py
+++ b/sugar/activity/activity.py
@@ -193,7 +193,10 @@ class Activity(Window, gtk.Container):
f = open(self.jobject.file_path, 'w')
f.write('mec')
f.close()
- datastore.write(self.jobject)
+ try:
+ datastore.write(self.jobject)
+ except Exception, e:
+ logging.error(e)
else:
self.jobject = None
diff --git a/sugar/datastore/dbus_helpers.py b/sugar/datastore/dbus_helpers.py
index f8733ea..9ec73cf 100644
--- a/sugar/datastore/dbus_helpers.py
+++ b/sugar/datastore/dbus_helpers.py
@@ -27,8 +27,12 @@ DS_DBUS_INTERFACE = "org.laptop.sugar.DataStore"
DS_DBUS_PATH = "/org/laptop/sugar/DataStore"
_bus = dbus.SessionBus()
-_data_store = dbus.Interface(_bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH),
- DS_DBUS_INTERFACE)
+try:
+ _data_store = dbus.Interface(_bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH),
+ DS_DBUS_INTERFACE)
+except Exception, e:
+ _data_store = None
+ logging.error(e)
def create(properties, filename):
logging.debug('dbus_helpers.create: %s, %s' % (properties, filename))