Parcourir la source

tools: Make Unicode from subprocess result in the CMake convert script

Fixes an issue with Python 3 in MSYS where it fails while trying to join
paths where one part is Unicode (default string on Python3) and the
second part are bytes (returned by the subprocess call).

Closes https://github.com/espressif/esp-idf/issues/5189
Roland Dobai il y a 5 ans
Parent
commit
b4bddbb22f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      tools/cmake/convert_to_cmake.py

+ 1 - 1
tools/cmake/convert_to_cmake.py

@@ -120,7 +120,7 @@ def convert_project(project_path):
     for p in component_paths:
         if "MSYSTEM" in os.environ:
             cmd = ["cygpath", "-w", p]
-            p = subprocess.check_output(cmd).strip()
+            p = subprocess.check_output(cmd).decode('utf-8').strip()
 
         convert_component(project_path, p)