Skip to content

Commit

Permalink
Remove un-necessary if block
Browse files Browse the repository at this point in the history
  • Loading branch information
oz123 committed Jun 20, 2019
1 parent 5c912f9 commit ed67d89
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions kubernetes/utils/create_from_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ed67d89

Please sign in to comment.