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

@ -227,7 +227,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`acpi` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -302,8 +302,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
output_line = {}

View File

@ -80,7 +80,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`airport -I` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -130,8 +130,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 = {}

View File

@ -109,7 +109,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`airport -s` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -166,8 +166,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = list(filter(None, data.splitlines()))

View File

@ -118,7 +118,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.7'
version = '1.8'
description = '`arp` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -171,8 +171,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = list(filter(None, data.splitlines()))

View File

@ -121,7 +121,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`blkid` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -176,8 +176,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -54,7 +54,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`cksum` and `sum` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -103,8 +103,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

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()

View File

@ -167,7 +167,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.6'
version = '1.7'
description = '`crontab` file parser with user support'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -220,8 +220,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()

View File

@ -75,7 +75,7 @@ import csv
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = 'CSV file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -119,8 +119,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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()

View File

@ -72,7 +72,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '2.1'
version = '2.2'
description = '`date` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -115,8 +115,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 = {}

View File

@ -99,7 +99,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.8'
version = '1.9'
description = '`df` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -204,8 +204,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()
fix_data = []

View File

@ -316,7 +316,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '2.1'
version = '2.2'
description = '`dig` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -529,8 +529,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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()

View File

@ -119,7 +119,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`dir` command parser'
author = 'Rasheed Elsaleh'
author_email = 'rasheed@rebelliondefense.com'
@ -173,8 +173,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -125,7 +125,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`dmidecode` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -177,8 +177,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
item_header = False
item_values = False

View File

@ -131,7 +131,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.1'
version = '1.2'
description = '`dpkg -l` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -217,8 +217,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
working_list = []
raw_output = []

View File

@ -88,7 +88,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`du` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -137,8 +137,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -69,7 +69,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`env` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -121,8 +121,8 @@ def parse(data, raw=False, quiet=False):
Dictionary of raw structured data or
List of Dictionaries of 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 = {}

View File

@ -63,7 +63,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`file` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -106,8 +106,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -92,7 +92,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.1'
version = '1.2'
description = '`finger` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -168,8 +168,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -86,8 +86,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -73,7 +73,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`free` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -122,8 +122,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()
raw_output = []

View File

@ -85,7 +85,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`/etc/fstab` file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -132,8 +132,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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()

View File

@ -109,7 +109,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`/etc/group` file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -160,8 +160,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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()

View File

@ -77,7 +77,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`/etc/gshadow` file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -126,8 +126,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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()

View File

@ -38,7 +38,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`hash` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -85,8 +85,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()
raw_output = []

View File

@ -68,7 +68,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.1'
version = '1.2'
description = 'hashsum command parser (`md5sum`, `shasum`, etc.)'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -113,8 +113,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -317,7 +317,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`hciconfig` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -372,8 +372,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
device_object = {}

View File

@ -59,7 +59,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`history` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -109,8 +109,8 @@ def parse(data, raw=False, quiet=False):
Dictionary of raw structured data or
List of Dictionaries of 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 = {}

View File

@ -74,7 +74,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`/etc/hosts` file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -117,8 +117,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -105,7 +105,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`id` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -161,8 +161,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 = {}

View File

@ -188,7 +188,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.10'
version = '1.11'
description = '`ifconfig` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -474,8 +474,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -66,7 +66,7 @@ import configparser
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = 'INI file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -125,8 +125,8 @@ def parse(data, raw=False, quiet=False):
Dictionary representing the ini file
"""
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 = {}

View File

@ -163,7 +163,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.6'
version = '1.7'
description = '`iptables` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -240,8 +240,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
chain = {}

View File

@ -121,7 +121,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '0.6'
version = '0.7'
description = '`iw dev [device] scan` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -293,8 +293,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
section = {}

View File

@ -93,7 +93,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`jobs` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -141,8 +141,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -104,7 +104,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.7'
version = '1.8'
description = '`last` and `lastb` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -185,8 +185,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -107,7 +107,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.9'
version = '1.10'
description = '`ls` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -162,8 +162,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
warned = False

View File

@ -269,7 +269,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.7'
version = '1.8'
description = '`lsblk` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -321,8 +321,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
# Clear any blank lines
cleandata = list(filter(None, data.splitlines()))

View File

@ -126,7 +126,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`lsmod` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -174,8 +174,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()
raw_output = []

View File

@ -120,7 +120,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`lsof` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -168,8 +168,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -262,7 +262,7 @@ from jc.exceptions import ParseError
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.0'
version = '1.1'
description = '`lsusb` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -815,8 +815,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
lsusb = _LsUsb()

View File

@ -75,7 +75,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.6'
version = '1.7'
description = '`mount` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -163,8 +163,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
# Clear any blank lines
cleandata = list(filter(None, data.splitlines()))

View File

@ -354,7 +354,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.11'
version = '1.12'
description = '`netstat` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -424,8 +424,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. Raw or processed structured data.
"""
import jc.utils
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.")
cleandata = list(filter(None, data.splitlines()))
raw_output = []

View File

@ -207,7 +207,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`ntpq -p` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -264,8 +264,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()
raw_output = []

View File

@ -94,7 +94,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`/etc/passwd` file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -142,8 +142,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -158,7 +158,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.6'
version = '1.7'
description = '`ping` and `ping6` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -616,8 +616,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 = {}

View File

@ -48,7 +48,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`pip list` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -91,8 +91,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -65,7 +65,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`pip show` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -108,8 +108,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
package = {}

View File

@ -207,7 +207,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`ps` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -276,8 +276,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()
raw_output = []

View File

@ -109,7 +109,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.6'
version = '1.7'
description = '`route` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -180,8 +180,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()[1:]

View File

@ -156,7 +156,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`rpm -qi` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -216,8 +216,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
entry_obj = {}

View File

@ -201,7 +201,7 @@ import jc.parsers.universal
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.1'
version = '1.2'
description = '`sfdisk` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -265,8 +265,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
item = {}

View File

@ -101,7 +101,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
version = '1.4'
description = '`/etc/shadow` file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -149,8 +149,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -279,7 +279,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`ss` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -337,8 +337,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
contains_colon = ['nl', 'p_raw', 'raw', 'udp', 'tcp', 'v_str', 'icmp6']
raw_output = []

View File

@ -169,7 +169,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.9'
version = '1.10'
description = '`stat` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -229,8 +229,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -54,7 +54,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.1'
version = '1.2'
description = '`sysctl` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -105,8 +105,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 = {}

View File

@ -58,7 +58,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`systemctl` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -101,8 +101,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
# Clear any blank lines
linedata = list(filter(None, data.splitlines()))

View File

@ -75,7 +75,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`systemctl list-jobs` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -123,8 +123,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
# Clear any blank lines
linedata = list(filter(None, data.splitlines()))

View File

@ -50,7 +50,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`systemctl list-sockets` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -93,8 +93,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
# Clear any blank lines
linedata = list(filter(None, data.splitlines()))

View File

@ -46,7 +46,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`systemctl list-unit-files` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -89,8 +89,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
# Clear any blank lines
linedata = list(filter(None, data.splitlines()))

View File

@ -205,7 +205,7 @@ import jc.utils
class info:
"""Provides parser metadata (version, author, etc.)"""
version = "1.0"
version = "1.1"
description = "`systeminfo` command parser"
author = "Jon Smith"
author_email = "jon@rebelliondefense.com"
@ -303,8 +303,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
delim = ":" # k/v delimiter
raw_data = {} # intermediary output

View File

@ -123,7 +123,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`/usr/bin/time` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -198,8 +198,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 = {}

View File

@ -63,7 +63,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`timedatectl status` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -116,8 +116,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 = {}

View File

@ -132,7 +132,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`tracepath` and `tracepath6` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -192,8 +192,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.")
RE_TTL_HOST = re.compile(r'^\s?(?P<ttl>\d+)(?P<ttl_guess>\??):\s+(?P<host>(?:no reply|\S+))') # groups: ttl, ttl_guess, host
RE_PMTU = re.compile(r'\spmtu\s(?P<pmtu>[\d]+)') # group: pmtu

View File

@ -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 = {}

View File

@ -199,7 +199,7 @@ import ipaddress
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.0'
version = '1.1'
description = '`ufw status` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -394,8 +394,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 = {}
rules_list = []

View File

@ -130,7 +130,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.0'
version = '1.1'
description = '`ufw app info [application]` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -265,8 +265,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
item_obj = {}

View File

@ -48,7 +48,7 @@ from jc.exceptions import ParseError
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.6'
version = '1.7'
description = '`uname -a` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -91,8 +91,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 = {}

View File

@ -194,7 +194,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`upower` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -323,8 +323,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
device_obj = {}

View File

@ -65,7 +65,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = '`uptime` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -155,8 +155,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()

View File

@ -121,7 +121,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.0'
version = '1.1'
description = '`vmstat` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -181,8 +181,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []
output_line = {}

View File

@ -104,7 +104,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`w` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -153,8 +153,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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.")
cleandata = data.splitlines()[1:]
raw_output = []

View File

@ -54,7 +54,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.2'
version = '1.3'
description = '`wc` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -103,8 +103,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -133,7 +133,7 @@ import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.4'
version = '1.5'
description = '`who` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -186,8 +186,8 @@ def parse(data, raw=False, quiet=False):
List of Dictionaries. 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 = []

View File

@ -71,7 +71,7 @@ from jc.exceptions import LibraryNotInstalled
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = 'XML file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -121,8 +121,8 @@ def parse(data, raw=False, quiet=False):
except Exception:
raise LibraryNotInstalled('The xmltodict library is not installed.')
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 = []

View File

@ -85,7 +85,7 @@ from jc.exceptions import LibraryNotInstalled
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.5'
version = '1.6'
description = 'YAML file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -135,8 +135,8 @@ def parse(data, raw=False, quiet=False):
except Exception:
raise LibraryNotInstalled('The ruamel.yaml library is not installed.')
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 = []