Skip to content

Commit

Permalink
MNT: Replace deprecated locale.getdefaultlocale
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jul 6, 2023
1 parent ef13221 commit fcb0e48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nipype/utils/filemanip.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def read_stream(stream, logger=None, encoding=None):
"""
default_encoding = encoding or locale.getdefaultlocale()[1] or "UTF-8"
default_encoding = encoding or locale.getpreferredencoding(do_setlocale=False)
logger = logger or fmlogger
try:
out = stream.decode(default_encoding)
Expand Down
2 changes: 1 addition & 1 deletion nipype/utils/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, name, impl):
self._buf = ""
self._rows = []
self._lastidx = 0
self.default_encoding = locale.getdefaultlocale()[1] or "UTF-8"
self.default_encoding = locale.getpreferredencoding(do_setlocale=False)

def fileno(self):
"Pass-through for file descriptor."
Expand Down

0 comments on commit fcb0e48

Please sign in to comment.