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 @@ -50,35 +50,12 @@ def find_xml_generator(name="castxml", search_path=None):
5050
5151 """
5252
53- if sys .version_info [:2 ] >= (3 , 3 ):
54- path = _find_xml_generator_for_python_greater_equals_33 (
55- name , search_path = search_path )
56- else :
57- path = _find_xml_generator_for_legacy_python (name )
58-
53+ path = shutil .which (name , path = search_path )
5954 if path == "" or path is None :
6055 raise Exception ("No c++ parser found. Please install castxml." )
6156 return path .rstrip (), name
6257
6358
64- def _find_xml_generator_for_python_greater_equals_33 (name , search_path = None ):
65- return shutil .which (name , path = search_path )
66-
67-
68- def _find_xml_generator_for_legacy_python (name ):
69- if platform .system () == "Windows" :
70- command = "where"
71- else :
72- command = "which"
73- p = subprocess .Popen ([command , name ], stdout = subprocess .PIPE ,
74- stderr = subprocess .PIPE )
75- path = p .stdout .read ().decode ("utf-8" )
76- p .wait ()
77- p .stdout .close ()
78- p .stderr .close ()
79- return path .rstrip ()
80-
81-
8259def _create_logger_ (name ):
8360 """Implementation detail, creates a logger."""
8461 logger = logging .getLogger (name )
You can’t perform that action at this time.
0 commit comments