ci: fix fetch submodule error on python3

pull/4494/head
He Yin Ling 2019-12-10 09:38:31 +08:00
rodzic 5991e7dd7a
commit fe521c9d12
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -32,6 +32,7 @@ class SubModule(object):
def _get_commit_id(self, path):
output = subprocess.check_output(["git", "ls-tree", "HEAD", path])
output = output.decode()
# example output: 160000 commit d88a262fbdf35e5abb372280eb08008749c3faa0 components/esp_wifi/lib
match = self.GIT_LS_TREE_OUTPUT_PATTERN.search(output)
return match.group(1)

Wyświetl plik

@ -15,7 +15,7 @@ class Gitlab(object):
config_data_from_env = os.getenv("PYTHON_GITLAB_CONFIG")
if config_data_from_env:
# prefer to load config from env variable
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
with tempfile.NamedTemporaryFile("w", delete=False) as temp_file:
temp_file.write(config_data_from_env)
config_files = [temp_file.name]
else: