retitle 658997 gwibber-service: Crashes if D-Bus connection to NetworkManager
fails.
tag 658997 +patch
thanks
* Johannes Brandstätter <[email protected]> [120718 10:05]:
> Package: gwibber-service
> Version: 3.0.0.1-2.1
> Severity: important
>
> Dear Maintainer,
>
> I am using Xfce, so no default install of the network-manager package.
>
> The initial error message i got from starting gwibber-service was a bit
> misleading:
I think rather than unneeded dependency, we should rather fix the
issue that introduced the error.
Patch is attached.
Thanks,
David
diff --git a/debian/patches/debbug_658997.patch b/debian/patches/debbug_658997.patch
new file mode 100644
index 0000000..1393025
--- /dev/null
+++ b/debian/patches/debbug_658997.patch
@@ -0,0 +1,37 @@
+--- a/gwibber/microblog/dispatcher.py
++++ b/gwibber/microblog/dispatcher.py
+@@ -820,20 +820,21 @@
+
+ self.NM_STATE_UNKNOWN = 0
+
+- log.logger.debug("NM Version is %s", str(self.nm.Get(NM_DBUS_INTERFACE, "Version")))
++ if self.has_nm:
++ 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
++ 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
+
+
+
diff --git a/debian/patches/series b/debian/patches/series
index e9b0350..96d29df 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ fix_facebook_ext_perms.patch
lp_735609.patch
lp_757451.patch
debbug-625221.patch
+debbug_658997.patch