Python compatibility fix (flutter/engine#39286)

Missed in https://github.com/flutter/engine/pull/39133
This commit is contained in:
Zachary Anderson
2023-01-31 08:03:55 -08:00
committed by GitHub
parent 0979dfce1d
commit e4a6e688e9

View File

@@ -254,6 +254,8 @@ def CheckCIPDPackageExists(package_name, tag):
tag,
]
stdout = subprocess.check_output(command)
# TODO ricardoamador: remove this check when python 2 is deprecated.
stdout = stdout if isinstance(stdout, str) else stdout.decode('UTF-8')
match = re.search(r'No matching instances\.', stdout)
if match:
return False