summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2016-01-02 01:39:59 +0100
committerGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2016-01-02 01:39:59 +0100
commit718ff08e1b8fe0b2ccd5681a621d19ea2a979547 (patch)
tree76106d919091f1cb9e1701bdfa237cf677c5d049
parent"is" is evil (diff)
downloadpyload-718ff08e1b8fe0b2ccd5681a621d19ea2a979547.tar.xz
[Plugin] Fix dump_html()
-rw-r--r--module/plugins/internal/Plugin.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index cf03085f7..3fd4a1d58 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -27,7 +27,7 @@ from module.plugins.internal.misc import (Config, DB, decode, encode, exists, fi
class Plugin(object):
__name__ = "Plugin"
__type__ = "plugin"
- __version__ = "0.64"
+ __version__ = "0.65"
__status__ = "stable"
__config__ = [] #: [("name", "type", "desc", "default")]
@@ -247,7 +247,12 @@ class Plugin(object):
os.makedirs(os.path.join("tmp", self.classname))
with open(framefile, "wb") as f:
- f.write(encode(self.last_html))
+ try:
+ html = encode(self.last_html)
+ except Exception:
+ html = self.last_html
+
+ f.write(html)
except IOError, e:
self.log_error(e)