Merge pull request #17573 from alexcohn:fix/android_windows_build
authorAlex Cohn <sasha.cohn@gmail.com>
Thu, 18 Jun 2020 07:40:43 +0000 (10:40 +0300)
committerGitHub <noreply@github.com>
Thu, 18 Jun 2020 07:40:43 +0000 (10:40 +0300)
* fixing #17572

https://github.com/opencv/opencv/issues/17572 Build for Android failed: "can't concat str to bytes"

on Windows 10 64bit with python 3.6.6

* similar to changes in platforms/winpack_dldt/build_package.py

platforms/android/build_sdk.py

index 7cd945d..14fd8f6 100755 (executable)
@@ -59,6 +59,8 @@ def check_executable(cmd):
     try:
         log.debug("Executing: %s" % cmd)
         result = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+        if not isinstance(result, str):
+            result = result.decode("utf-8")
         log.debug("Result: %s" % (result+'\n').split('\n')[0])
         return True
     except Exception as e: