--- gwibber/microblog/dispatcher.py_old 2011-07-04 09:38:47.415809455 +0200 +++ gwibber/microblog/dispatcher.py 2011-07-04 09:40:47.174640849 +0200 @@ -820,21 +820,24 @@ self.NM_STATE_UNKNOWN = 0 - log.logger.debug("NM Version is %s", str(self.nm.Get(NM_DBUS_INTERFACE, "Version"))) - - if str(self.nm.Get(NM_DBUS_INTERFACE, "Version")) >= "0.8.998": - log.logger.debug("NM Version is greater than 0.8.997") - self.NM_STATE_ASLEEP = 10 - self.NM_STATE_DISCONNECTED = 20 - self.NM_STATE_CONNECTING = 40 - self.NM_STATE_CONNECTED = 70 - else: - log.logger.debug("NM Version is less than 0.8.998") - self.NM_STATE_ASLEEP = 1 - self.NM_STATE_CONNECTING = 2 - self.NM_STATE_CONNECTED = 3 - self.NM_STATE_DISCONNECTED = 4 + try: + log.logger.debug("NM Version is %s", str(self.nm.Get(NM_DBUS_INTERFACE, "Version"))) + if str(self.nm.Get(NM_DBUS_INTERFACE, "Version")) >= "0.8.998": + log.logger.debug("NM Version is greater than 0.8.997") + self.NM_STATE_ASLEEP = 10 + self.NM_STATE_DISCONNECTED = 20 + self.NM_STATE_CONNECTING = 40 + self.NM_STATE_CONNECTED = 70 + else: + log.logger.debug("NM Version is less than 0.8.998") + self.NM_STATE_ASLEEP = 1 + self.NM_STATE_CONNECTING = 2 + self.NM_STATE_CONNECTED = 3 + self.NM_STATE_DISCONNECTED = 4 + + except: + log.logger.debug("NM seems not to be available") def on_connection_changed(self, state):