diff --git a/jc/parsers/crontab_u.py b/jc/parsers/crontab_u.py index 1c1090a2..6487cf3e 100644 --- a/jc/parsers/crontab_u.py +++ b/jc/parsers/crontab_u.py @@ -133,7 +133,7 @@ import jc.parsers.universal class info(): - version = '1.0' + version = '1.1' description = 'crontab file parser with user support' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -228,13 +228,13 @@ def parse(data, raw=False, quiet=False): # Clear any commented lines for i, line in reversed(list(enumerate(cleandata))): - if line.strip().find('#') == 0: + if line.strip().startswith('#'): cleandata.pop(i) # Pop any variable assignment lines cron_var = [] for i, line in reversed(list(enumerate(cleandata))): - if line.find('=') != -1: + if '=' in line: var_line = cleandata.pop(i) var_name = var_line.split('=', maxsplit=1)[0].strip() var_value = var_line.split('=', maxsplit=1)[1].strip()