From 434a090aa2a9181131c09cb59c75f92530651b33 Mon Sep 17 00:00:00 2001 From: Hanspeter Spalinger <hanspeter@spahan.ch> Date: Wed, 10 Aug 2016 11:12:23 +0200 Subject: [PATCH] objects are not dicts --- chkcrontab_lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py index 37d8e69..6dbd931 100755 --- a/chkcrontab_lib.py +++ b/chkcrontab_lib.py @@ -695,10 +695,10 @@ class CronLineTimeAction(object): self.user = user self.command = command self.whitelisted_users = [] - if 'whitelisted_users' in options: + if hasattr(options, 'whitelisted_users'): self.whitelisted_users = options.whitelisted_users - self_check_passwd = True - if 'check_passwd' in options: + self.check_passwd = True + if hasattr(options, 'check_passwd'): self.check_passwd = options.check_passwd def _CheckTimeField(self, log): -- GitLab