1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

Improve and standardize empty data check for all parsers

This commit is contained in:
Kelly Brazil
2020-06-14 17:17:40 -07:00
parent 2af61730f0
commit cc0f0971d7
56 changed files with 449 additions and 412 deletions

View File

@ -133,7 +133,7 @@ import jc.parsers.universal
class info():
version = '1.2'
version = '1.3'
description = 'crontab file parser with user support'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -226,7 +226,8 @@ def parse(data, raw=False, quiet=False):
# Clear any blank lines
cleandata = list(filter(None, cleandata))
if cleandata:
if jc.utils.has_data(data):
# Clear any commented lines
for i, line in reversed(list(enumerate(cleandata))):
if line.strip().startswith('#'):