Make sure it starts even if not all resources are available yet
authorJoachim Breitner <mail@joachim-breitner.de>
Mon, 24 Nov 2008 16:07:29 +0000 (17:07 +0100)
committerJoachim Breitner <mail@joachim-breitner.de>
Mon, 24 Nov 2008 16:07:29 +0000 (17:07 +0100)
Make sure openmoko-panel-plugin starts even if not all resources are
available yet (slightly ugly hack)

debian/changelog
openmoko-panel-plugin

index 7f847d2..74519b1 100644 (file)
@@ -1,3 +1,11 @@
+openmoko-panel-plugin (0.6-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Make sure openmoko-panel-plugin starts even if not all resources are
+    available yet (slightly ugly hack)
+
+ -- Joachim Breitner <nomeata@debian.org>  Mon, 24 Nov 2008 17:06:30 +0100
+
 openmoko-panel-plugin (0.6-2) pkg-fso; urgency=low
 
   * do not vibrated if disabled in config
index a745113..fd358cd 100755 (executable)
@@ -521,7 +521,10 @@ class UsageIcon(StatusIcon):
         self.resourcename = resourcename
 
         self.dbus.usage_iface.connect_to_signal( "ResourceChanged", self.resourceChanged )
-        self.resourcestate = self.dbus.usage_iface.GetResourceState(self.resourcename)
+       try:
+                self.resourcestate = self.dbus.usage_iface.GetResourceState(self.resourcename)
+        except:
+                self.resourcestate = 0
 
         StatusIcon.__init__(self, dbus, parentObject, configName)