/mandos/release

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

« back to all changes in this revision

Viewing changes to mandos-ctl

  • Committer: Teddy Hogeborn
  • Date: 2019-02-28 20:57:45 UTC
  • mto: (237.7.594 trunk)
  • mto: This revision was merged to the branch mainline in revision 382.
  • Revision ID: teddy@recompile.se-20190228205745-zl3bd1yoz0q343lm
mandos-ctl: Use isinstance(x, X) instead of type(x) is X

* mandos-ctl (print_clients): Don't use type(value) and check for
                              dbus.Boolean instances exactly; use
                              isinstance() to be more generic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
 
250
250
def print_clients(clients, keywords):
251
251
    def valuetostring(value, keyword):
252
 
        if type(value) is dbus.Boolean:
 
252
        if isinstance(value, dbus.Boolean):
253
253
            return "Yes" if value else "No"
254
254
        if keyword in ("Timeout", "Interval", "ApprovalDelay",
255
255
                       "ApprovalDuration", "ExtendedTimeout"):