/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-02-10 03:54:09 UTC
  • Revision ID: teddy@recompile.se-20190210035409-l2mqp2ftzkggwybz
Do minor fix to make mandos-monitor work with new python-urwid

* mandos-monitor (UserInterface.log): Initialize to an
                                      urwid.SimpleListWalker([]), not
                                      an empty list.
  (UserInterface.log_message_raw): Fix off-by-one error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
        self.clients_dict = {}
445
445
 
446
446
        # We will add Text widgets to this list
447
 
        self.log = []
 
447
        self.log = urwid.SimpleListWalker([])
448
448
        self.max_log_length = max_log_length
449
449
 
450
450
        self.log_level = log_level
503
503
        if self.max_log_length:
504
504
            if len(self.log) > self.max_log_length:
505
505
                del self.log[0:len(self.log)-self.max_log_length-1]
506
 
        self.logbox.set_focus(len(self.logbox.body.contents),
 
506
        self.logbox.set_focus(len(self.logbox.body.contents)-1,
507
507
                              coming_from="above")
508
508
        self.refresh()
509
509