diff --git a/README.rst b/README.rst index 946defa2ef95016a333a9284e0810f26b9bd8eda..0dfa1406c61f8068076ad53016c53bbf65a0c926 100644 --- a/README.rst +++ b/README.rst @@ -51,7 +51,8 @@ TODO * Look for duplicate entries. Puppet sometimes loads up crontabs with dups. * Check for backticks. (why?) -* Make sure MAILTO and PATH are set (perhaps others?) +* Make sure MAILTO and PATH are set (perhaps others?). +* Add tests for command line. Credits ======= diff --git a/chkcrontab b/chkcrontab index 9020dfb510f9a67ddf51c0da574eb530e8fff76e..ff5fe98ef320cd0a25b4cc8a1e8ad628730c122d 100755 --- a/chkcrontab +++ b/chkcrontab @@ -22,6 +22,8 @@ Basic usage: chkcrontab crontab_file """ +from __future__ import print_function + __author__ = 'lyda@google.com (Kevin Lyda)' import sys @@ -31,10 +33,10 @@ import chkcrontab_lib as check def main(argv): """main program.""" if len(argv) != 2: - print 'ERROR: No crontab file was specified.' + print('ERROR: No crontab file was specified.') sys.exit(1) log = check.LogCounter() - print 'Checking correctness of %s' % argv[1] + print('Checking correctness of %s' % argv[1]) return check.check_crontab(argv[1], log) if __name__ == '__main__': diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py index ac1e8a4f3e68fbe715e2ca655d796623ba070a80..f8943e81ff7aaa795b01b240fbc578aa5e020ecb 100755 --- a/chkcrontab_lib.py +++ b/chkcrontab_lib.py @@ -65,6 +65,7 @@ A brief description of each class and function: CheckCrontab: Checks the a crontab file. """ +from __future__ import print_function # For Python 2.5 from __future__ import with_statement