[hamster-applet] fixed bug 591035 - don't die if the dbus interface for hamster is taken (as in other hamster already
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] fixed bug 591035 - don't die if the dbus interface for hamster is taken (as in other hamster already
- Date: Sat, 8 Aug 2009 07:52:09 +0000 (UTC)
commit 5b4a79d027ef567d314af8368ce786533ac42945
Author: Toms Bauģis <toms baugis gmail com>
Date: Sat Aug 8 10:24:03 2009 +0300
fixed bug 591035 - don't die if the dbus interface for hamster is taken (as in other hamster already running)
hamster/hamsterdbus.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/hamster/hamsterdbus.py b/hamster/hamsterdbus.py
index f21e6c1..963dc7e 100644
--- a/hamster/hamsterdbus.py
+++ b/hamster/hamsterdbus.py
@@ -47,7 +47,13 @@ class HamsterDbusController(dbus.service.Object):
for the hamster-applet and performs the necesary conversion
between dbus types and hamster-applet data types
"""
- dbus.service.Object.__init__(self, bus_name, HAMSTER_PATH)
+ try:
+ dbus.service.Object.__init__(self, bus_name, HAMSTER_PATH)
+ except KeyError:
+ # KeyError is thrown when the dbus interface is taken
+ # that is there is other hamster running somewhere
+ print "D-Bus interface registration failed - other hamster running somewhere"
+ pass
@staticmethod
def to_dbus_fact(fact):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]