Skip to content

Commit

Permalink
Add conditional in case there is no character_found in error arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
fpereiro committed Mar 1, 2021
1 parent 3708118 commit f7b1c4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def parse():
else:
error_template = hedy_errors[E.error_code]
# Localize the names of characters
E.arguments['character_found'] = hedy_errors[E.arguments['character_found']]
if 'character_found' in E.arguments:
E.arguments['character_found'] = hedy_errors[E.arguments['character_found']]
response["Error"] = error_template.format(**E.arguments)
except Exception as E:
print(f"error transpiling {code}")
Expand Down

0 comments on commit f7b1c4c

Please sign in to comment.