Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kevin Lyda
chkcrontab
Commits
ce2732ec
Commit
ce2732ec
authored
Jan 04, 2017
by
Kevin Lyda
💬
Browse files
Fix nonexistant file error.
parent
dc322abe
Changes
1
Hide whitespace changes
Inline
Side-by-side
chkcrontab_lib.py
View file @
ce2732ec
...
...
@@ -1059,11 +1059,12 @@ class LogCounter(object):
def
check_crontab
(
arguments
,
log
):
"""Check a crontab file.
Checks crontab_file for a variety of errors or potential errors. This only
works with the crontab format found in /etc/crontab and /etc/cron.d.
Checks arguments.crontab for a variety of errors or potential errors.
This only works with the crontab format found in /etc/crontab and
/etc/cron.d.
Args:
arguments: ArgumentP
A
rser
O
bject containing the crontab file and options
arguments: ArgumentP
a
rser
o
bject containing the crontab file and options
.
log: A LogCounter object.
Returns:
...
...
@@ -1074,7 +1075,7 @@ def check_crontab(arguments, log):
# Check if the file even exists.
if
not
os
.
path
.
exists
(
arguments
.
crontab
):
log
.
Warn
(
'File "%s" does not exist.'
%
crontab
_file
)
log
.
Warn
(
'File "%s" does not exist.'
%
arguments
.
crontab
)
return
log
.
Summary
()
# Add the any specified users to the whitelist
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment