-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Elliot Murphy wrote:
| Hi!
|
| Second try to fix https://bugs.edge.launchpad.net/bzr/+bug/107169.
|
| I saw a comment in this branch lp:///~iacobs/bzr-gtk/bug228922/ that
| DBusException.get_bus_name() is not present in older versions of dbus. I
| don't know what to do about that other than catch all the
| DBusExceptions. Is this an acceptable fix?

You could use:


get_dbus_name = getattr(e, 'get_dbus_name', None)
if get_dbus_name is None:
~  # ???
elif get_debus_name() == 'XXXXX':
~  raise ImportError
else:
~  raise

I don't know what you want to do if dbus is older.

Personally, I find the whole layout to be distasteful. The module should import,
and a future 'setup' query into the module should fail if it cannot initialize.
Having to catch anything but 'ImportError' as part of 'import foo' is ugly.

Does seahorse.py *really* need to have the bus at import time? Couldn't it just
find the bus when you actually ask for something?

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhHBFQACgkQJdeBCYSNAAP9SgCghaxhD+qQDTtfROHUI9dpeVV4
qqwAoJTNd4HT2EaXw388da8+Xm1jyfsz
=utNJ
-----END PGP SIGNATURE-----

-- 
bzr-gtk mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.canonical.com/mailman/listinfo/bzr-gtk

Reply via email to