From ce2732ec85dbe53d91c02447a7f00eb2b45cf122 Mon Sep 17 00:00:00 2001
From: Kevin Lyda <kevin@ie.suberic.net>
Date: Wed, 4 Jan 2017 17:15:18 +0000
Subject: [PATCH] Fix nonexistant file error.

---
 chkcrontab_lib.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py
index 37a17c0..6035fec 100755
--- a/chkcrontab_lib.py
+++ b/chkcrontab_lib.py
@@ -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: ArgumentPArser Object containing the crontab file and options
+    arguments: ArgumentParser object 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
-- 
GitLab