Skip to content

Commit

Permalink
Avoid keyerror
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Feb 9, 2022
1 parent dbe109c commit c35b333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/yadage/steering_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create(cls, **kwargs):
dataopts = kwargs.get("dataopts") or {}
metadir = (
kwargs["metadir"]
if kwargs["metadir"] is not None
if "metadir" in kwargs.keys() and kwargs["metadir"] is not None
else f"{kwargs['dataarg']}/_yadage/"
)
if dataopts.get("overwrite") and os.path.exists(metadir):
Expand Down

0 comments on commit c35b333

Please sign in to comment.