Skip to content

Commit

Permalink
Merge pull request #1057 from eth-brownie/fix-console-globals
Browse files Browse the repository at this point in the history
Remove `__ret_value__` prior to writing to console
  • Loading branch information
iamdefinitelyahuman authored Apr 16, 2021
2 parents 1e1e7b6 + fadaccf commit f4ba974
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brownie/_cli/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ def runsource(self, source, filename="<input>", symbol="single"):
pass
self.runcode(code)
if "__ret_value__" in self.locals and self.locals["__ret_value__"] is not None:
self._console_write(self.locals["__ret_value__"])
del self.locals["__ret_value__"]
return_value = self.locals.pop("__ret_value__")
self._console_write(return_value)
return False

def paste_event(self, event):
Expand Down

0 comments on commit f4ba974

Please sign in to comment.