Log --debug as UTF-8 to fix charmap mapping (v2)
This commit is contained in:
parent
f1babdb596
commit
a85a032e09
@ -195,13 +195,13 @@ def blackholeStdoutForFrozenWindow():
|
||||
_file = None
|
||||
_error = None
|
||||
|
||||
def write(self, text, fname='.syncplay.log', encoding='utf-8'):
|
||||
def write(self, text, fname='.syncplay.log'):
|
||||
if self._file is None and self._error is None:
|
||||
if os.name != 'nt':
|
||||
path = os.path.join(os.getenv('HOME', '.'), fname)
|
||||
else:
|
||||
path = os.path.join(os.getenv('APPDATA', '.'), fname)
|
||||
self._file = open(path, 'a')
|
||||
self._file = open(path, 'a', encoding='utf-8')
|
||||
# TODO: Handle errors.
|
||||
if self._file is not None:
|
||||
self._file.write(text)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user