mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
Merge branch 'test/add_ethernet_iperf_example_test_case' into 'master'
Test: add ethernet iperf example test case Closes TCI-463 See merge request espressif/esp-idf!13696
This commit is contained in:
@@ -31,14 +31,8 @@ Config file format is yaml. it's a set of key-value pair. The following is an ex
|
||||
It will first define the env tag for each environment, then add its key-value pairs.
|
||||
This will prevent test cases from getting configs from other env when there're configs for multiple env in one file.
|
||||
"""
|
||||
import logging
|
||||
|
||||
import yaml
|
||||
|
||||
try:
|
||||
from yaml import CLoader as Loader
|
||||
except ImportError:
|
||||
from yaml import Loader as Loader
|
||||
from yaml import Loader as Loader
|
||||
|
||||
|
||||
class Config(object):
|
||||
@@ -59,11 +53,8 @@ class Config(object):
|
||||
try:
|
||||
with open(config_file) as f:
|
||||
configs = yaml.load(f, Loader=Loader)[env_name]
|
||||
except (OSError, TypeError, IOError):
|
||||
except (OSError, TypeError, IOError, KeyError):
|
||||
configs = dict()
|
||||
except KeyError:
|
||||
logging.error('No config env "{}" in config file "{}"'.format(env_name, config_file))
|
||||
raise
|
||||
return configs
|
||||
|
||||
def get_variable(self, variable_name):
|
||||
|
Reference in New Issue
Block a user