summaryrefslogtreecommitdiffstats
path: root/module/ConfigParser.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-09 23:29:24 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-09 23:29:24 +0100
commitaa78d90803a68e41ea663adb623c859cae3ad91e (patch)
treec793e30df9fccdf350fcd299e70fb3c14fabc36a /module/ConfigParser.py
parentcaptcha manager fix, toggle reconnect (diff)
downloadpyload-aa78d90803a68e41ea663adb623c859cae3ad91e.tar.xz
new config page, mootools 1.3, removed old templates
Diffstat (limited to 'module/ConfigParser.py')
-rw-r--r--module/ConfigParser.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/module/ConfigParser.py b/module/ConfigParser.py
index 55db6b3e3..3304ec258 100644
--- a/module/ConfigParser.py
+++ b/module/ConfigParser.py
@@ -240,9 +240,11 @@ class ConfigParser:
value = data["value"] + "\n"
else:
value = str(data["value"]) + "\n"
-
- f.write('\t%s %s : "%s" = %s' % (data["type"], option, data["desc"], value) )
- #----------------------------------------------------------------------
+ try:
+ f.write('\t%s %s : "%s" = %s' % (data["type"], option, data["desc"], value) )
+ except UnicodeEncodeError:
+ f.write('\t%s %s : "%s" = %s' % (data["type"], option, data["desc"], value.encode("utf8")) )
+
def cast(self, typ, value):
"""cast value to given format"""
if type(value) not in (str, unicode):