Add support for older pyyaml versions

main
Micke Nordin 4 years ago
parent 7a37e424cf
commit 413d061c13

@ -44,7 +44,10 @@ class gMNd:
def read_config(self):
with open(self.config_file) as configfile:
try:
config_dict = yaml.load(configfile, Loader=yaml.FullLoader)
except AttributeError:
config_dict = yaml.safe_load(configfile)
if 'allow_dir_list' in config_dict:
self.allow_dir_list = config_dict['allow_dir_list']
if 'base_path' in config_dict:

Loading…
Cancel
Save