Skip to content

Commit

Permalink
Merge pull request #43 from chinoll/master
Browse files Browse the repository at this point in the history
Fix an exception thrown when the language of Windows is set to Chinese
  • Loading branch information
alfiopuglisi committed Jun 17, 2022
2 parents 604e8dd + a6bfe82 commit 9f47277
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion guietta/guietta.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def __exit__(self, *args):
else:
# Do not use inspect.getsourcelines because it appears
# to fail on some systems
lines = open(self._start.filename).readlines()
lines = open(self._start.filename,encoding='utf-8').readlines()
withlines = lines[self._start.lineno - 1 : end.lineno]

withsource = textwrap.dedent(''.join(withlines))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Load the package's __version__.py module as a dictionary.
here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here, NAME, '__version__.py')) as f:
with open(os.path.join(here, NAME, '__version__.py'),encoding='utf-8') as f:
exec(f.read(), about)


Expand Down

0 comments on commit 9f47277

Please sign in to comment.