Comment 13 for bug 107169

Revision history for this message
Elliot Murphy (statik) wrote :

The previous one was rejected as suppressing too many errors, I have proposed this patch instead:

=== modified file 'seahorse.py'
--- seahorse.py 2008-05-23 08:23:59 +0000
+++ seahorse.py 2008-06-04 20:51:32 +0000
@@ -28,7 +28,13 @@
 KEY_TYPE_OPENPGP = 'openpgp'
 KEY_TYPE_SSH = 'ssh'

-bus = dbus.SessionBus()
+try:
+ bus = dbus.SessionBus()
+except dbus.exceptions.DBusException, e:
+ if e.get_dbus_name() == "org.freedesktop.DBus.Error.Spawn.ExecFailed":
+ raise ImportError
+ else
+ raise

 try:
     crypto = dbus.Interface(bus.get_object(BUS_NAME, CRYPTO_PATH),