Temporary try..excepts while we stabilize the new datastore.

This commit is contained in:
Tomeu Vizoso 2007-05-10 14:16:48 +02:00
parent 46eea8fc7f
commit 30114f9545
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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))