Arthur-Wu committed this file on 2024-11-25
This commit is contained in:
@ -13,7 +13,20 @@ class YamlHandler():
|
||||
return yaml.load(f.read(), Loader=yaml.FullLoader)
|
||||
except Exception as e:
|
||||
print("ERROR: read yaml file error::".format(e))
|
||||
return 'failed to read avata autotest config file.'
|
||||
return 'failed to read config file.'
|
||||
|
||||
def read_some_yamls(self, YamlFilePathsList, encoding='utf-8'):
|
||||
try:
|
||||
result = []
|
||||
for YamlFilePath in YamlFilePathsList:
|
||||
with open(YamlFilePath, encoding=encoding) as f:
|
||||
data = yaml.load(f.read(), Loader=yaml.FullLoader)
|
||||
result.append(data)
|
||||
return result
|
||||
except Exception as e:
|
||||
print("ERROR: read some yaml files error::".format(e))
|
||||
return 'failed to read config file.'
|
||||
|
||||
|
||||
class ReadExcel(object):
|
||||
'''@Author:: Arthur Wu
|
||||
|
Reference in New Issue
Block a user