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

add 'str' type check on input

This commit is contained in:
Kelly Brazil
2021-11-29 16:29:23 -08:00
parent eb888dcbbc
commit caaeaf0d67
76 changed files with 227 additions and 227 deletions

View File

@ -171,7 +171,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`crontab` command and file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -225,8 +225,8 @@ def parse(data, raw=False, quiet=False):
Dictionary. Raw or processed structured data.
"""
if not quiet:
jc.utils.compatibility(__name__, info.compatible)
if not quiet: jc.utils.compatibility(__name__, info.compatible)
if not isinstance(data, str): raise TypeError("Input data must be a 'str' object.")
raw_output = {}
cleandata = data.splitlines()