Remove un-necessary if block
This commit is contained in:
parent
5c912f986f
commit
ed67d89f9b
@ -66,13 +66,12 @@ def create_from_yaml(
|
||||
processing of the request.
|
||||
Valid values are: - All: all dry run stages will be processed
|
||||
"""
|
||||
if path.exists(yaml_file):
|
||||
with open(path.abspath(yaml_file)) as f:
|
||||
content = f.read()
|
||||
try:
|
||||
yaml_file = StringIO(content)
|
||||
except TypeError:
|
||||
yaml_file = StringIO(content.decode('utf-8'))
|
||||
with open(path.abspath(yaml_file)) as f:
|
||||
content = f.read()
|
||||
try:
|
||||
yaml_file = StringIO(content)
|
||||
except TypeError:
|
||||
yaml_file = StringIO(content.decode('utf-8'))
|
||||
|
||||
yml_document_all = yaml.safe_load_all(yaml_file)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user