File tree Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -55,35 +55,12 @@ def find_xml_generator(name="castxml", search_path=None):
5555
5656 """
5757
58- if sys .version_info [:2 ] >= (3 , 3 ):
59- path = _find_xml_generator_for_python_greater_equals_33 (
60- name , search_path = search_path )
61- else :
62- path = _find_xml_generator_for_legacy_python (name )
63-
58+ path = shutil .which (name , path = search_path )
6459 if path == "" or path is None :
6560 raise Exception ("No c++ parser found. Please install castxml." )
6661 return path .rstrip (), name
6762
6863
69- def _find_xml_generator_for_python_greater_equals_33 (name , search_path = None ):
70- return shutil .which (name , path = search_path )
71-
72-
73- def _find_xml_generator_for_legacy_python (name ):
74- if platform .system () == "Windows" :
75- command = "where"
76- else :
77- command = "which"
78- p = subprocess .Popen ([command , name ], stdout = subprocess .PIPE ,
79- stderr = subprocess .PIPE )
80- path = p .stdout .read ().decode ("utf-8" )
81- p .wait ()
82- p .stdout .close ()
83- p .stderr .close ()
84- return path .rstrip ()
85-
86-
8764def _create_logger_ (name ):
8865 """Implementation detail, creates a logger."""
8966 logger = logging .getLogger (name )
You can’t perform that action at this time.
0 commit comments