summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-26 20:30:20 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-26 20:30:20 +0100
commitce845e53f8a816c8cde4423f9abfb58f599301db (patch)
tree10af4a57995b992c467c3d1dfe3b85fec5fc4f8b
parentxmpp reconnect fix (diff)
downloadpyload-ce845e53f8a816c8cde4423f9abfb58f599301db.tar.xz
encoding fix
-rw-r--r--module/plugins/Plugin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 23c9bbf6d..ffac26864 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -300,7 +300,12 @@ class Plugin(object):
makedirs(join("tmp", self.__name__))
f = open(join("tmp", self.__name__, "%s_line%s.dump.html" % (frame.f_back.f_code.co_name, frame.f_back.f_lineno)), "wb")
- f.write(res.encode("utf8"))
+ try:
+ res = res.encode("utf8")
+ except:
+ pass
+
+ f.write(res)
f.close()
return res