diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py index 37d8e699468e300699509ec6079e8b28e10d12de..6dbd93111eba9b8c5da060f6cdf4ceff2fb2e009 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):