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