[wicd/f14] Catch D-Bus connection failures and prevent abrt reporting (#713109)
David Cantrell
dcantrel at fedoraproject.org
Fri Aug 5 15:16:40 UTC 2011
commit 88b1811c749d43d1abce5d8383634bf5a1d557ba
Author: David Cantrell <dcantrell at redhat.com>
Date: Fri Aug 5 11:14:53 2011 -0400
Catch D-Bus connection failures and prevent abrt reporting (#713109)
wicd-1.7.0-dbus-failure.patch | 50 +++++++++++++++++++++++++++++++++++++++++
wicd.spec | 6 ++++-
2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/wicd-1.7.0-dbus-failure.patch b/wicd-1.7.0-dbus-failure.patch
new file mode 100644
index 0000000..3d2eacf
--- /dev/null
+++ b/wicd-1.7.0-dbus-failure.patch
@@ -0,0 +1,50 @@
+diff -up wicd-1.7.0/cli/wicd-cli.py.orig wicd-1.7.0/cli/wicd-cli.py
+--- wicd-1.7.0/cli/wicd-cli.py.orig 2010-01-14 23:49:11.000000000 -0500
++++ wicd-1.7.0/cli/wicd-cli.py 2011-08-05 11:09:57.561058338 -0400
+@@ -43,6 +43,10 @@ except dbus.DBusException:
+ print 'Error: Could not connect to the daemon. Please make sure it is running.'
+ sys.exit(3)
+
++if daemon is None:
++ print 'Error connecting to wicd via D-Bus. Please make sure the wicd service is running.'
++ sys.exit(3)
++
+ parser = optparse.OptionParser()
+
+ parser.add_option('--network', '-n', type='int', default=-1)
+diff -up wicd-1.7.0/curses/wicd-curses.py.orig wicd-1.7.0/curses/wicd-curses.py
+--- wicd-1.7.0/curses/wicd-curses.py.orig 2010-01-14 23:49:11.000000000 -0500
++++ wicd-1.7.0/curses/wicd-curses.py 2011-08-05 11:09:00.248056606 -0400
+@@ -1016,6 +1016,10 @@ def setup_dbus(force=True):
+ wireless = dbus_ifaces['wireless']
+ wired = dbus_ifaces['wired']
+
++ if daemon is None:
++ print 'Error connecting to wicd via D-Bus. Please make sure the wicd service is running.'
++ sys.exit(3)
++
+ netentry_curses.dbus_init(dbus_ifaces)
+ return True
+
+diff -up wicd-1.7.0/gtk/gui.py.orig wicd-1.7.0/gtk/gui.py
+--- wicd-1.7.0/gtk/gui.py.orig 2010-01-14 23:49:11.000000000 -0500
++++ wicd-1.7.0/gtk/gui.py 2011-08-05 10:49:08.392177338 -0400
+@@ -146,6 +146,17 @@ class appGui(object):
+ """ Initializes everything needed for the GUI. """
+ setup_dbus()
+
++ if daemon is None:
++ errmsg = "Error connecting to wicd service via D-Bus." + \
++ "Please ensure the wicd service is running."
++ d = gtk.MessageDialog(parent=None,
++ flags=gtk.DIALOG_MODAL,
++ type=gtk.MESSAGE_ERROR,
++ buttons=gtk.BUTTONS_OK,
++ message_format=errmsg)
++ d.run()
++ sys.exit(1)
++
+ self.tray = tray
+
+ gladefile = os.path.join(wpath.gtk, "wicd.glade")
+diff -up wicd-1.7.0/gtk/wicd-client.py.orig wicd-1.7.0/gtk/wicd-client.py
diff --git a/wicd.spec b/wicd.spec
index fb33648..b44db1f 100644
--- a/wicd.spec
+++ b/wicd.spec
@@ -7,7 +7,7 @@
Name: wicd
Version: 1.7.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Wireless and wired network connection manager
Group: System Environment/Base
@@ -18,6 +18,7 @@ Source1: wicd.logrotate
Patch0: wicd-1.7.0-remove-WHEREAREMYFILES.patch
Patch1: wicd-1.7.0-initscript.patch
Patch2: wicd-1.7.0-deepcopy.patch
+Patch3: wicd-1.7.0-dbus-failure.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: python2-devel
@@ -256,6 +257,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
%changelog
+* Fri Aug 05 2011 David Cantrell <dcantrell at redhat.com> - 1.7.0-5
+- Catch D-Bus connection failures and prevent abrt reporting (#713109)
+
* Fri Oct 22 2010 David Cantrell <dcantrell at redhat.com> - 1.7.0-4
- Use cPickle instead of deepcopy in configmanager.py (#645251)
More information about the scm-commits
mailing list