[Pkg-bazaar-commits] ./bzr-gtk/unstable r501: (Elliot Murphy) Fix dbus importing
Martin Albisetti
argentina at gmail.com
Fri Apr 10 07:44:43 UTC 2009
------------------------------------------------------------
revno: 501
committer: Martin Albisetti <argentina at gmail.com>
branch nick: gtk.merges
timestamp: Fri 2008-06-20 00:33:17 -0300
message:
(Elliot Murphy) Fix dbus importing
modified:
seahorse.py
------------------------------------------------------------
revno: 498.1.1
committer: Elliot Murphy <elliot at elliotmurphy.com>
branch nick: gtk
timestamp: Wed 2008-06-04 11:17:57 -0400
message:
Don't fail when getting unexpected DBus errors out of seahorse,
just continue on without seahorse.
modified:
revisionview.py
------------------------------------------------------------
revno: 498.1.2
committer: Elliot Murphy <elliot at elliotmurphy.com>
branch nick: gtk
timestamp: Wed 2008-06-04 16:36:54 -0400
message:
Trying to fix bug 107169 so that visualize can be used even if there are DBus problems which prevent seahorse from being loaded
modified:
revisionview.py
seahorse.py
------------------------------------------------------------
revno: 498.1.3
committer: Elliot Murphy <elliot at elliotmurphy.com>
branch nick: gtk
timestamp: Wed 2008-06-04 16:51:32 -0400
message:
Match DBus Spawn.ExecFailed exception rather than all DBus exceptions.
modified:
seahorse.py
------------------------------------------------------------
revno: 498.1.4
committer: Elliot Murphy <elliot at elliotmurphy.com>
branch nick: gtk
timestamp: Wed 2008-06-04 17:18:12 -0400
message:
fix silly typo
modified:
seahorse.py
------------------------------------------------------------
revno: 498.1.5
committer: Elliot Murphy <elliot at elliotmurphy.com>
branch nick: gtk
timestamp: Thu 2008-06-05 00:17:41 -0400
message:
Using _dbus_error_name instead of get_dbus_name() to work with older
versions of dbus.
modified:
seahorse.py
------------------------------------------------------------
revno: 498.1.6
committer: Elliot Murphy <elliot at elliotmurphy.com>
branch nick: gtk
timestamp: Thu 2008-06-05 02:42:32 -0400
message:
Fix stupid typo, add johns latest suggestion.
modified:
seahorse.py
-------------- next part --------------
=== modified file 'seahorse.py'
--- a/seahorse.py 2008-05-29 09:48:48 +0000
+++ b/seahorse.py 2008-06-20 03:33:17 +0000
@@ -28,7 +28,20 @@
KEY_TYPE_OPENPGP = 'openpgp'
KEY_TYPE_SSH = 'ssh'
-bus = dbus.SessionBus()
+try:
+ bus = dbus.SessionBus()
+except dbus.exceptions.DBusException, e:
+ get_name = getattr(e, 'get_dbus_name', None)
+ if get_name is not None:
+ name = get_name()
+ else:
+ name = getattr(e, '_dbus_error_name', None)
+ # DBus sometimes fails like this, just treat it as if seahorse is not
+ # available rather than crashing.
+ if name == "org.freedesktop.DBus.Error.Spawn.ExecFailed":
+ raise ImportError
+ else:
+ raise
if hasattr(bus, 'list_activatable_names'):
bus_names = bus.list_activatable_names()
More information about the Pkg-bazaar-commits
mailing list