Skip to content
Snippets Groups Projects
Commit f113730b authored by Alán Muñoz's avatar Alán Muñoz
Browse files

fix(abc): restore from_yaml alg

parent 750401fa
No related branches found
No related tags found
No related merge requests found
......@@ -80,16 +80,16 @@ class ParametersABC(ABC):
Returns instance from a yaml filename or stdin
"""
is_buffer = True
try:
if Path(source).exists():
is_buffer = False
except Exception:
except:
pass
if is_buffer:
params = safe_load(source)
with open(source) as f:
params = safe_load(f)
else:
with open(source) as f:
params = safe_load(f)
return cls(**params)
@classmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment