summaryrefslogtreecommitdiff
path: root/poezio/config.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-01-13 15:29:23 +0100
committermathieui <mathieui@mathieui.net>2018-01-13 15:29:23 +0100
commit391eb279640ea9250f5d16d44c4691a5b7d4efc1 (patch)
tree4dbfe20c6e8493b620f72e36abbcfde8d9dde8b2 /poezio/config.py
parentb981327df58eac0cf41a206333bf36dd5c4e2330 (diff)
downloadpoezio-391eb279640ea9250f5d16d44c4691a5b7d4efc1.tar.gz
poezio-391eb279640ea9250f5d16d44c4691a5b7d4efc1.tar.bz2
poezio-391eb279640ea9250f5d16d44c4691a5b7d4efc1.tar.xz
poezio-391eb279640ea9250f5d16d44c4691a5b7d4efc1.zip
Open and write logs and config files in utf-8
Diffstat (limited to 'poezio/config.py')
-rw-r--r--poezio/config.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/config.py b/poezio/config.py
index 7ac630b6..08920942 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -337,7 +337,8 @@ class Config(RawConfigParser):
prefix, file = path.split(self.file_name)
filename = path.join(prefix, '.%s.tmp' % file)
fd = os.fdopen(
- os.open(filename, os.O_WRONLY | os.O_CREAT, 0o600), 'w')
+ os.open(filename, os.O_WRONLY | os.O_CREAT, 0o600,), 'w',
+ encoding='utf-8')
for line in lines:
fd.write('%s\n' % line)
fd.close()