/mandos/trunk

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

« back to all changes in this revision

Viewing changes to mandos-monitor

  • Committer: Teddy Hogeborn
  • Date: 2019-08-05 21:14:05 UTC
  • Revision ID: teddy@recompile.se-20190805211405-9m6hecekaihpttz9
Override lintian warnings about upgrading from old versions

There are some really things which are imperative that we fix in case
someone were to upgrade from a really old version.  We want to keep
these fixes in the postinst maintainer scripts, even though lintian
complains about such old upgrades not being supported by Debian in
general.  We prefer the code being there, for the sake of the users.

* debian/mandos-client.lintian-overrides
  (maintainer-script-supports-ancient-package-version): New.
  debian/mandos.lintian-overrides
  (maintainer-script-supports-ancient-package-version): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python3 -bb
 
1
#!/usr/bin/python
2
2
# -*- mode: python; coding: utf-8 -*-
3
3
#
4
4
# Mandos Monitor - Control and monitor the Mandos server
33
33
 
34
34
import sys
35
35
import os
36
 
import warnings
 
36
 
37
37
import datetime
38
38
 
39
39
import urwid.curses_display
59
59
domain = 'se.recompile'
60
60
server_interface = domain + '.Mandos'
61
61
client_interface = domain + '.Mandos.Client'
62
 
version = "1.8.9"
 
62
version = "1.8.6"
63
63
 
64
64
try:
65
65
    dbus.OBJECT_MANAGER_IFACE
467
467
        self.busname = domain + '.Mandos'
468
468
        self.main_loop = GLib.MainLoop()
469
469
 
470
 
    def client_not_found(self, key_id, address):
471
 
        self.log_message("Client with address {} and key ID {} could"
472
 
                         " not be found".format(address, key_id))
 
470
    def client_not_found(self, fingerprint, address):
 
471
        self.log_message("Client with address {} and fingerprint {}"
 
472
                         " could not be found"
 
473
                         .format(address, fingerprint))
473
474
 
474
475
    def rebuild(self):
475
476
        """This rebuilds the User Interface.
627
628
                            path=path)
628
629
 
629
630
        self.refresh()
630
 
        self._input_callback_tag = (
631
 
            GLib.io_add_watch(
632
 
                GLib.IOChannel.unix_new(sys.stdin.fileno()),
633
 
                GLib.PRIORITY_DEFAULT, GLib.IO_IN,
634
 
                self.process_input))
 
631
        self._input_callback_tag = (GLib.io_add_watch
 
632
                                    (sys.stdin.fileno(),
 
633
                                     GLib.IO_IN,
 
634
                                     self.process_input))
635
635
        self.main_loop.run()
636
636
        # Main loop has finished, we should close everything now
637
637
        GLib.source_remove(self._input_callback_tag)
638
 
        with warnings.catch_warnings():
639
 
            warnings.simplefilter("ignore", BytesWarning)
640
 
            self.screen.stop()
 
638
        self.screen.stop()
641
639
 
642
640
    def stop(self):
643
641
        self.main_loop.quit()