/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: Vincent Ladeuil
  • Date: 2008-06-09 15:59:13 UTC
  • mto: This revision was merged to the branch mainline in revision 503.
  • Revision ID: v.ladeuil+lp@free.fr-20080609155913-ueadh6vzmn81wwuk
Fix test failing after a feature rename in bzr.

* tests/test_diff.py:
(TestDiffView.test_unicode):
bzrlib.tests.test_diff.UnicodeFilename has benn renamed
bzrlib.tests.UnicodeFilenameFeature in bzr.

* tests/test_commit.py:
(TestCommitDialog_Commit.test_commit_unicode_messages):
bzrlib.tests.test_diff.UnicodeFilename has benn renamed
bzrlib.tests.UnicodeFilenameFeature in bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
KEY_TYPE_OPENPGP = 'openpgp'
29
29
KEY_TYPE_SSH = 'ssh'
30
30
 
31
 
try:
32
 
    bus = dbus.SessionBus()
33
 
except dbus.exceptions.DBusException, e:
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.
41
 
    if name == "org.freedesktop.DBus.Error.Spawn.ExecFailed":
42
 
        raise ImportError
43
 
    else:
44
 
        raise
 
31
bus = dbus.SessionBus()
45
32
 
46
33
if hasattr(bus, 'list_activatable_names'):
47
34
    bus_names = bus.list_activatable_names()
85
72
        if key not in keyset:
86
73
            keyset[key] = Key(key)
87
74
 
88
 
        return (cleartext, keyset[key])
89
 
 
90
 
    return (cleartext, None)
91
 
 
 
75
        return keyset[key]
92
76
 
93
77
class Key:
94
78