Skip to content

Commit

Permalink
Fix execution of commands including "emulator" variable
Browse files Browse the repository at this point in the history
Resolves #7
  • Loading branch information
Ircama committed Feb 19, 2021
1 parent 2f75404 commit 5d7d4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elm/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,10 @@ def postloop(self):
def default(self, arg):
emulator = self.emulator # ref. host_lib
try:
print ( eval(arg) )
print(eval(arg, locals()))
except Exception:
try:
exec(arg, globals())
exec(arg, locals())
except Exception as e:
print("Error executing command: %s" % e)

Expand Down

0 comments on commit 5d7d4de

Please sign in to comment.