/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-05-05 16:04:32 UTC
  • mto: (487.1.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: v.ladeuil+lp@free.fr-20080505160432-hrhie62i03vcu3cw
Fix genpot.sh and prepare for bug #187283 fixing.

* po/olive-gtk.pot: 
Regenerated so that we can test for regressions in the "'_'
replaced by '_i18n'" modification.

* genpot.sh: 
Handle all python files.

* olive/__init__.py:
Delete coding line. It looks like an emacs coding line, it smells
like an emacs coding line, but emacs doesn't like it and it's
useless anyway.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
KEY_TYPE_SSH = 'ssh'
30
30
 
31
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
45
 
 
46
 
if hasattr(bus, 'list_activatable_names'):
47
 
    bus_names = bus.list_activatable_names()
48
 
else:
49
 
    bus_object = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
50
 
    bus_names = bus_object.ListNames(dbus_interface='org.freedesktop.DBus')
51
 
 
52
 
if BUS_NAME not in bus_names:
 
32
    dbus.validate_bus_name(BUS_NAME)
 
33
except ValueError:
53
34
    raise ImportError
54
35
 
 
36
bus = dbus.SessionBus()
 
37
 
55
38
crypto = dbus.Interface(bus.get_object(BUS_NAME, CRYPTO_PATH), 
56
39
                        CRYPTO_INTERFACE)
57
40
openpgp = dbus.Interface(bus.get_object(BUS_NAME, OPENPGP_PATH),
85
68
        if key not in keyset:
86
69
            keyset[key] = Key(key)
87
70
 
88
 
        return (cleartext, keyset[key])
89
 
 
90
 
    return (cleartext, None)
91
 
 
 
71
        return keyset[key]
92
72
 
93
73
class Key:
94
74