File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/pynxtools/dataconverter Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 3434
3535from pynxtools import get_nexus_version , get_nexus_version_hash
3636from pynxtools .definitions .dev_tools .utils .nxdl_utils import (
37+ find_definition_file ,
3738 get_enums ,
3839 get_inherited_nodes ,
3940 get_nexus_definitions_path ,
@@ -405,16 +406,10 @@ def get_nxdl_root_and_path(nxdl: str):
405406 "NXtest_extended" : os .path .join (data_path , "NXtest_extended.nxdl.xml" ),
406407 }
407408
408- probable_file_paths = [
409- os .path .join (definitions_path , "contributed_definitions" , f"{ nxdl } .nxdl.xml" ),
410- os .path .join (definitions_path , "applications" , f"{ nxdl } .nxdl.xml" ),
411- os .path .join (definitions_path , "base_classes" , f"{ nxdl } .nxdl.xml" ),
412- ]
413409 if nxdl in special_names :
414410 nxdl_f_path = special_names [nxdl ]
415411 else :
416- nxdl_f_path = next ((x for x in probable_file_paths if os .path .exists (x )), None )
417-
412+ nxdl_f_path = find_definition_file (nxdl )
418413 if nxdl_f_path is None :
419414 raise FileNotFoundError (f"The nxdl file, { nxdl } , was not found." )
420415
You can’t perform that action at this time.
0 commit comments