/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2024-11-03 15:32:05 UTC
  • mto: This revision was merged to the branch mainline in revision 412.
  • Revision ID: teddy@recompile.se-20241103153205-qota5ic1c4m2nqh4
Detect GPGME version correctly

It seems that newer versions of dpkg-query can print an empty version.
Change the code to also parse this output.

Reported-By: Pablo Abelenda <pabelenda@igalia.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
if sys.version_info < (3, 2):
144
144
    configparser.Configparser = configparser.SafeConfigParser
145
145
 
146
 
version = "1.8.16"
 
146
version = "1.8.17"
147
147
stored_state_file = "clients.pickle"
148
148
 
149
149
log = logging.getLogger(os.path.basename(sys.argv[0]))
961
961
            # key_id() and fingerprint() functions
962
962
            client["key_id"] = (section.get("key_id", "").upper()
963
963
                                .replace(" ", ""))
964
 
            client["fingerprint"] = (section["fingerprint"].upper()
 
964
            client["fingerprint"] = (section.get("fingerprint",
 
965
                                                 "").upper()
965
966
                                     .replace(" ", ""))
 
967
            if not (client["key_id"] or client["fingerprint"]):
 
968
                log.error("Skipping client %s without key_id or"
 
969
                          " fingerprint", client_name)
 
970
                del settings[client_name]
 
971
                continue
966
972
            if "secret" in section:
967
973
                client["secret"] = codecs.decode(section["secret"]
968
974
                                                 .encode("utf-8"),
3237
3243
    # From the Avahi example code
3238
3244
    DBusGMainLoop(set_as_default=True)
3239
3245
    main_loop = GLib.MainLoop()
3240
 
    bus = dbus.SystemBus()
 
3246
    if use_dbus or zeroconf:
 
3247
        bus = dbus.SystemBus()
3241
3248
    # End of Avahi example code
3242
3249
    if use_dbus:
3243
3250
        try: