Просмотр исходного кода

test_config: fix the bug that will generate !!python/unicode

As an example, [7964999 example_test_002_](https://gitlab.espressif.cn:6688/espressif/esp-idf/-/jobs/7964999/artifacts/file/examples/test_configs/example_test_002_.yml)
Fu Hanxi 5 лет назад
Родитель
Сommit
76d118577e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      tools/ci/python_packages/tiny_test_fw/Utility/GitlabCIJob.py

+ 1 - 1
tools/ci/python_packages/tiny_test_fw/Utility/GitlabCIJob.py

@@ -62,4 +62,4 @@ class Job(dict):
         file_name = os.path.join(file_path, self["name"] + ".yml")
         if "case group" in self:
             with open(file_name, "w") as f:
-                yaml.dump(self["case group"].output(), f, default_flow_style=False)
+                yaml.safe_dump(self["case group"].output(), f, encoding='utf-8', default_flow_style=False)