fixing the xml action list yaml file location search

This commit is contained in:
hardy
2020-08-25 10:55:43 +02:00
parent 8b3eb61f1c
commit e2b19083e5
+8 -2
View File
@@ -3324,9 +3324,15 @@ import yaml
xml_class_list_file=''
if (os.path.isfile('xml_class_list.yml')):
xml_class_list_file='xml_class_list.yml'
elif (os.path.isfile('ci_scripts/xml_class_list.yml')):
xml_class_list_file='ci_scripts/xml_class_list.yml'
else:
logging.error("XML action list yaml file cannot be found")
sys.exit("XML action list yaml file cannot be found")
#file will be opened only if it exists
with open(xml_class_list_file,'r') as file:
# The FullLoader parameter handles the conversion from YAML
# scalar values to Python the dictionary format
# The FullLoader parameter handles the conversion
#from YAML scalar values to Python dictionary format
xml_class_list = yaml.load(file,Loader=yaml.FullLoader)
mode = ''