mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
add 'str' type check on input
This commit is contained in:
@ -119,7 +119,7 @@ import jc.utils
|
||||
|
||||
class info():
|
||||
"""Provides parser metadata (version, author, etc.)"""
|
||||
version = '1.3'
|
||||
version = '1.4'
|
||||
description = '`traceroute` and `traceroute6` command parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
@ -368,8 +368,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 = {}
|
||||
|
||||
|
Reference in New Issue
Block a user