Don't use YAML as a singleton, seems to be stateful; Use ruamel in get_config for consistency

This commit is contained in:
cmdr2
2023-06-30 10:37:25 +05:30
parent ec353ba90d
commit 26042b1e26
2 changed files with 5 additions and 4 deletions

View File

@ -17,10 +17,11 @@ args = parser.parse_args()
if os.path.isfile(config_yaml):
import yaml
from ruamel.yaml import YAML
yaml = YAML(typ='safe')
with open(config_yaml, 'r') as configfile:
try:
config = yaml.safe_load(configfile)
config = yaml.load(configfile)
except Exception as e:
print(e, file=sys.stderr)
config = {}