/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: 2011-04-02 06:37:18 UTC
  • Revision ID: teddy@fukt.bsnet.se-20110402063718-13ldrcuu0t33sdc4
* mandos: Tolerate restarting Avahi servers.  Also Changed to new
          "except x as y" exception syntax.
  (AvahiService.entry_group_state_changed_match): New; contains the
                                                  SignalMatch object.
  (AvahiService.remove): Really remove the group and the signal
                         connection, if any.
  (AvahiService.add): Always create a new group and signal connection.
  (AvahiService.cleanup): Changed to simply call remove().
  (AvahiService.server_state_changed): Handle and log more bad states.
  (AvahiService.activate): Set "follow_name_owner_changes=True" on the
                           Avahi Server proxy object.
  (ClientDBus.checked_ok): Do not return anything.
  (ClientDBus.CheckedOK): Do not return anything, as documented.
* mandos-monitor: Call D-Bus methods asynchronously.

Show diffs side-by-side

added added

removed removed

Lines of Context:
358
358
        """Handle keys.
359
359
        This overrides the method from urwid.FlowWidget"""
360
360
        if key == "+":
361
 
            self.proxy.Enable(dbus_interface = client_interface)
 
361
            self.proxy.Enable(dbus_interface = client_interface,
 
362
                              ignore_reply=True)
362
363
        elif key == "-":
363
 
            self.proxy.Disable(dbus_interface = client_interface)
 
364
            self.proxy.Disable(dbus_interface = client_interface,
 
365
                               ignore_reply=True)
364
366
        elif key == "a":
365
367
            self.proxy.Approve(dbus.Boolean(True, variant_level=1),
366
 
                               dbus_interface = client_interface)
 
368
                               dbus_interface = client_interface,
 
369
                               ignore_reply=True)
367
370
        elif key == "d":
368
371
            self.proxy.Approve(dbus.Boolean(False, variant_level=1),
369
 
                                  dbus_interface = client_interface)
 
372
                                  dbus_interface = client_interface,
 
373
                               ignore_reply=True)
370
374
        elif key == "R" or key == "_" or key == "ctrl k":
371
375
            self.server_proxy_object.RemoveClient(self.proxy
372
 
                                                  .object_path)
 
376
                                                  .object_path,
 
377
                                                  ignore_reply=True)
373
378
        elif key == "s":
374
 
            self.proxy.StartChecker(dbus_interface = client_interface)
 
379
            self.proxy.StartChecker(dbus_interface = client_interface,
 
380
                                    ignore_reply=True)
375
381
        elif key == "S":
376
 
            self.proxy.StopChecker(dbus_interface = client_interface)
 
382
            self.proxy.StopChecker(dbus_interface = client_interface,
 
383
                                   ignore_reply=True)
377
384
        elif key == "C":
378
 
            self.proxy.CheckedOK(dbus_interface = client_interface)
 
385
            self.proxy.CheckedOK(dbus_interface = client_interface,
 
386
                                 ignore_reply=True)
379
387
        # xxx
380
388
#         elif key == "p" or key == "=":
381
389
#             self.proxy.pause()