Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2011-08-11 20:04:42 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2011-08-11 20:04:42 (GMT)
commit4562238a9e13ee3e1c43840a1affb35a54d6bb80 (patch)
tree032075e92411ea719eda30158837379117957b80
parent55f5ac6c6bc3124f8e4dc7efb0ffeb20f67dd452 (diff)
Do Udisk initialization in a try except
Right now, the device manager is not full working because we do not have a way to create off line catalogs. In XO-1.75 GetBooks does not start because errors in Udisks initialization, but is not needed to normal use. Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--devicemanager.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/devicemanager.py b/devicemanager.py
index 2e300d8..736312c 100644
--- a/devicemanager.py
+++ b/devicemanager.py
@@ -42,11 +42,13 @@ class DeviceManager(gobject.GObject):
'/org/freedesktop/UDisks')
self._udisk_iface = dbus.Interface(self._udisk_proxy,
'org.freedesktop.UDisks')
+ try:
+ self._populate_devices()
- self._populate_devices()
-
- self._udisk_iface.connect_to_signal('DeviceChanged',
- self.__device_changed_cb)
+ self._udisk_iface.connect_to_signal('DeviceChanged',
+ self.__device_changed_cb)
+ except dbus.exceptions.DBusException, e:
+ logging.error('Exception initializing UDisks: %s', e)
def _populate_devices(self):
for device in self._udisk_proxy.EnumerateDevices():