From a5962e6adaef7201233e235401d50fb96142d7d6 Mon Sep 17 00:00:00 2001 From: Devan Franchini Date: Wed, 9 Oct 2013 23:35:30 -0400 Subject: WebappConfig/dotconfig.py: Encodes .webapp info in utf-8 when writing. --- WebappConfig/dotconfig.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'WebappConfig/dotconfig.py') 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: -- cgit v1.2.3-65-gdbad