summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2013-10-09 23:35:30 -0400
committerDevan Franchini <twitch153@gentoo.org>2013-10-28 22:29:10 -0400
commita5962e6adaef7201233e235401d50fb96142d7d6 (patch)
tree585b8351b0672599df54c17b9b272aaff6bb8d43
parentWebappConfig/content.py: Encodes md5 content in utf-8 when writing. (diff)
downloadwebapp-config-a5962e6adaef7201233e235401d50fb96142d7d6.tar.gz
webapp-config-a5962e6adaef7201233e235401d50fb96142d7d6.tar.bz2
webapp-config-a5962e6adaef7201233e235401d50fb96142d7d6.zip
WebappConfig/dotconfig.py: Encodes .webapp info in utf-8 when writing.
-rw-r--r--WebappConfig/dotconfig.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/WebappConfig/dotconfig.py b/WebappConfig/dotconfig.py
index ce2845c..cab0392 100644
--- a/WebappConfig/dotconfig.py
+++ b/WebappConfig/dotconfig.py
@@ -248,7 +248,6 @@ class DotConfig:
'# automatically created by Gentoo\'s webapp-config',
'# do NOT edit this file by hand',
'',]
-
for i in self.__tokens:
info.append(i + '="' + self.__data[i] + '"')
@@ -259,7 +258,7 @@ class DotConfig:
os.O_WRONLY | os.O_CREAT,
self.__perm(0o600))
- os.write(fd, '\n'.join(info))
+ os.write(fd, ('\n'.join(info)).encode('utf-8'))
os.close(fd)
except Exception as e: