Skip to content

Commit ed67d89

Browse files
committed
Remove un-necessary if block
1 parent 5c912f9 commit ed67d89

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

kubernetes/utils/create_from_yaml.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,12 @@ def create_from_yaml(
6666
processing of the request.
6767
Valid values are: - All: all dry run stages will be processed
6868
"""
69-
if path.exists(yaml_file):
70-
with open(path.abspath(yaml_file)) as f:
71-
content = f.read()
72-
try:
73-
yaml_file = StringIO(content)
74-
except TypeError:
75-
yaml_file = StringIO(content.decode('utf-8'))
69+
with open(path.abspath(yaml_file)) as f:
70+
content = f.read()
71+
try:
72+
yaml_file = StringIO(content)
73+
except TypeError:
74+
yaml_file = StringIO(content.decode('utf-8'))
7675

7776
yml_document_all = yaml.safe_load_all(yaml_file)
7877

0 commit comments

Comments
 (0)