/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-ctl

  • Committer: Teddy Hogeborn
  • Date: 2019-03-09 23:55:43 UTC
  • Revision ID: teddy@recompile.se-20190309235543-g36rsz4ephch356t
mandos-ctl: Don't call D-Bus to get property for --is-enabled

* mandos-ctl (IsEnabledCmd.is_enabled): Check properties dict, don't
                                        use D-Bus.

Show diffs side-by-side

added added

removed removed

Lines of Context:
438
438
            sys.exit(0)
439
439
        sys.exit(1)
440
440
    def is_enabled(self, client, properties):
441
 
        log.debug("D-Bus: %s:%s:%s.Get(%r, %r)", busname,
442
 
                  client.__dbus_object_path__,
443
 
                  dbus.PROPERTIES_IFACE, client_interface,
444
 
                  "Enabled")
445
 
        return bool(client.Get(client_interface, "Enabled",
446
 
                               dbus_interface=dbus.PROPERTIES_IFACE))
 
441
        return properties["Enabled"]
447
442
 
448
443
class RemoveCmd(Command):
449
444
    def run_on_one_client(self, client, properties):