Take out one try..except block.

This commit is contained in:
Tomeu Vizoso 2007-05-28 16:25:36 +02:00
parent d2aaebac38
commit 8915657a08

View File

@ -27,12 +27,8 @@ DS_DBUS_INTERFACE = "org.laptop.sugar.DataStore"
DS_DBUS_PATH = "/org/laptop/sugar/DataStore"
_bus = dbus.SessionBus()
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)
_data_store = dbus.Interface(_bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH),
DS_DBUS_INTERFACE)
def create(properties, filename):
object_id = _data_store.create(dbus.Dictionary(properties), filename)