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

make ruamel.yaml library optional

This commit is contained in:
Kelly Brazil
2021-03-26 16:10:28 -07:00
parent 3638298af8
commit 4d394015f4

View File

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