Skip to content

Commit

Permalink
Merge pull request #16 from ookiineko/main
Browse files Browse the repository at this point in the history
fixup! localize: hook_open: correct global var ref
  • Loading branch information
kaqijiang committed Apr 23, 2023
2 parents 0f4c1f3 + 7341509 commit 5465033
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autogpt/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ def my_open(orig_open, *args, **kwargs):
return orig_open(*args, encoding='utf-8', **kwargs)

def hook_open():
global hooked_open

if not hooked_open:
orig_open = open
builtins.open = lambda *args, **kwargs: my_open(orig_open, *args, **kwargs)
Expand Down

0 comments on commit 5465033

Please sign in to comment.