/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to seahorse.py

  • Committer: Elliot Murphy
  • Date: 2008-06-05 06:42:32 UTC
  • mto: This revision was merged to the branch mainline in revision 501.
  • Revision ID: elliot@elliotmurphy.com-20080605064232-m2nsiukr0fj0z70l
Fix stupid typo, add johns latest suggestion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
try:
32
32
    bus = dbus.SessionBus()
33
33
except dbus.exceptions.DBusException, e:
34
 
    name = hasattr(e, _dbus_error_name, None)
 
34
    get_name = getattr(e, 'get_dbus_name', None)
 
35
    if get_name is not None:
 
36
        name = get_name()
 
37
    else:
 
38
        name = getattr(e, '_dbus_error_name', None)
 
39
    # DBus sometimes fails like this, just treat it as if seahorse is not
 
40
    # available rather than crashing.
35
41
    if name == "org.freedesktop.DBus.Error.Spawn.ExecFailed":
36
42
        raise ImportError
37
43
    else: