From 6eae782f13953dd0ba2bbe1b582cf33fd4d7d90a Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 19 Dec 2011 23:10:49 +0100 Subject: configparser v2, warning CONFIG will be DELETED. --- module/Utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/Utils.py') diff --git a/module/Utils.py b/module/Utils.py index 9ad7c2737..b26a9960c 100644 --- a/module/Utils.py +++ b/module/Utils.py @@ -21,7 +21,10 @@ def chmod(*args): def decode(string): """ decode string with utf if possible """ try: - return string.decode("utf8", "replace") + if type(string) == str: + return string.decode("utf8", "replace") + else: + return string except: return string -- cgit v1.2.3