Skip to content
Snippets Groups Projects
Commit 69661940 authored by Jeremy Jarrell's avatar Jeremy Jarrell
Browse files

Simplifies the check for determining whether whitelisted users are present.

Adds an a doc comment for the whitelisted users arg.
parent 28e8d13b
Branches
Tags
No related merge requests found
...@@ -1052,6 +1052,7 @@ def check_crontab(crontab_file, log, whitelisted_users=None): ...@@ -1052,6 +1052,7 @@ def check_crontab(crontab_file, log, whitelisted_users=None):
Args: Args:
crontab_file: Name of the crontab file to check. crontab_file: Name of the crontab file to check.
log: A LogCounter object. log: A LogCounter object.
whitelisted_users: A comma delimited list of users to ignore when warning on unrecognized users.
Returns: Returns:
0 if there were no errors. 0 if there were no errors.
...@@ -1064,7 +1065,7 @@ def check_crontab(crontab_file, log, whitelisted_users=None): ...@@ -1064,7 +1065,7 @@ def check_crontab(crontab_file, log, whitelisted_users=None):
return log.Summary() return log.Summary()
# Add the any specified users to the whitelist # Add the any specified users to the whitelist
if not whitelisted_users is None: if whitelisted_users:
USER_WHITELIST.update(whitelisted_users) USER_WHITELIST.update(whitelisted_users)
# Check the file name. # Check the file name.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment