mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-01 03:25:15 +00:00
python: Fix yaml.load warnings
Since pyyaml 5.1 yaml.load without specifing loader is deprecated Details: https://msg.pyyaml.org/load To keep code compatible with older versions of pyyaml and keep best perfomance CLoader with fallback to Loader is used.
This commit is contained in:
@@ -47,6 +47,11 @@ import yaml
|
||||
|
||||
from Utility import (CaseConfig, SearchCases, GitlabCIJob, console_log)
|
||||
|
||||
try:
|
||||
from yaml import CLoader as Loader
|
||||
except ImportError:
|
||||
from yaml import Loader as Loader
|
||||
|
||||
|
||||
class Group(object):
|
||||
|
||||
@@ -150,7 +155,7 @@ class AssignTest(object):
|
||||
def _parse_gitlab_ci_config(self, ci_config_file):
|
||||
|
||||
with open(ci_config_file, "r") as f:
|
||||
ci_config = yaml.load(f)
|
||||
ci_config = yaml.load(f, Loader=Loader)
|
||||
|
||||
job_list = list()
|
||||
for job_name in ci_config:
|
||||
|
Reference in New Issue
Block a user