Skip to content

Commit

Permalink
tiny typo fix in addToDict
Browse files Browse the repository at this point in the history
  • Loading branch information
mattEhall committed Aug 24, 2023
1 parent 9f0ea3f commit cb3ebf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moorpy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ def addToDict(dict1, dict2, key1, key2, default=None):
Otherwise will raise error if the key doesn't exist.
'''

if key in dict1:
val = dict1[key]
if key1 in dict1:
val = dict1[key1]
else:
if default == None:
raise ValueError(f"Key '{key1}' not found in input dictionary...")
Expand Down

0 comments on commit cb3ebf8

Please sign in to comment.