1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

make xmltodict library optional

This commit is contained in:
Kelly Brazil
2021-03-26 16:14:35 -07:00
parent 4d394015f4
commit 808c7bc0a9

View File

@ -59,12 +59,18 @@ Examples:
...
}
"""
import sys
import jc.utils
import xmltodict
# check if xml library is installed and fail gracefully if it is not
try:
import xmltodict
except Exception:
jc.utils.error_message('The xmltodict library is not installed.')
sys.exit(1)
class info():
version = '1.2'
version = '1.3'
description = 'XML file parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'