/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

  • Committer: Teddy Hogeborn
  • Date: 2009-04-01 03:37:45 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090401033745-c89k6bij5opdm1rk
* mandos (ClientDBus.__del__): Bug fix: Correct mispasted code, and do
                               not try to call
                               dbus.service.Object.__del__() if it
                               does not exist.
  (ClientDBus.start_checker): Simplify logic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
459
459
    def __del__(self, *args, **kwargs):
460
460
        try:
461
461
            self.remove_from_connection()
462
 
        except org.freedesktop.DBus.Python.LookupError:
 
462
        except LookupError:
463
463
            pass
464
 
        dbus.service.Object.__del__(self, *args, **kwargs)
 
464
        if hasattr(dbus.service.Object, "__del__"):
 
465
            dbus.service.Object.__del__(self, *args, **kwargs)
465
466
        Client.__del__(self, *args, **kwargs)
466
467
    
467
468
    def checker_callback(self, pid, condition, command,
502
503
        else:
503
504
            old_checker_pid = None
504
505
        r = Client.start_checker(self, *args, **kwargs)
505
 
        # Only emit D-Bus signal if new checker process was started
506
 
        if ((self.checker is not None)
507
 
            and not (old_checker is not None
508
 
                     and old_checker_pid == self.checker.pid)):
 
506
        # Only if new checker process was started
 
507
        if (self.checker is not None
 
508
            and old_checker_pid != self.checker.pid):
 
509
            # Emit D-Bus signal
509
510
            self.CheckerStarted(self.current_checker_command)
510
511
            self.PropertyChanged(
511
512
                dbus.String("checker_running"),