Skip to content

Commit

Permalink
Open the file in binary mode and use the compile function to compile …
Browse files Browse the repository at this point in the history
…the byte stream.

Closes #18
  • Loading branch information
jaraco committed Aug 5, 2024
1 parent 9ab4370 commit 54bfcff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ def proxy():
__path__ = [{os.getcwd()!r}]
__file__ = __path__[0] + '/__init__.py'
try:
strm = open(__file__)
strm = open(__file__, 'rb')
except FileNotFoundError:
pass
else:
with strm:
exec(strm.read())
exec(compile(strm.read(), __file__, 'exec'))
""").lstrip()

0 comments on commit 54bfcff

Please sign in to comment.