Skip to content

Commit

Permalink
Merge pull request #78 from yong422/notexists-getdefaultencoding
Browse files Browse the repository at this point in the history
* Replace to locale.getdefaultlocale because there is no locale.getdefaultencoding
  • Loading branch information
techalchemy committed Apr 5, 2019
2 parents 94301fa + 43174a8 commit 9973b4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/78.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug in ``vistir.misc.locale_encoding`` which caused invocation of a non-existent method called ``getlocaleencoding`` which forced all systems to use default encoding of ``ascii``.
2 changes: 1 addition & 1 deletion src/vistir/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def chunked(n, iterable):


try:
locale_encoding = locale.getdefaultencoding()[1] or "ascii"
locale_encoding = locale.getdefaultlocale()[1] or "ascii"
except Exception:
locale_encoding = "ascii"

Expand Down

0 comments on commit 9973b4f

Please sign in to comment.