fixing the xml action list yaml file location search
This commit is contained in:
+8
-2
@@ -3324,9 +3324,15 @@ import yaml
|
|||||||
xml_class_list_file=''
|
xml_class_list_file=''
|
||||||
if (os.path.isfile('xml_class_list.yml')):
|
if (os.path.isfile('xml_class_list.yml')):
|
||||||
xml_class_list_file='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:
|
with open(xml_class_list_file,'r') as file:
|
||||||
# The FullLoader parameter handles the conversion from YAML
|
# The FullLoader parameter handles the conversion
|
||||||
# scalar values to Python the dictionary format
|
#from YAML scalar values to Python dictionary format
|
||||||
xml_class_list = yaml.load(file,Loader=yaml.FullLoader)
|
xml_class_list = yaml.load(file,Loader=yaml.FullLoader)
|
||||||
|
|
||||||
mode = ''
|
mode = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user