From 718ff08e1b8fe0b2ccd5681a621d19ea2a979547 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Sat, 2 Jan 2016 02:39:59 +0200 Subject: [Plugin] Fix dump_html() --- module/plugins/internal/Plugin.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/plugins/internal') 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) -- cgit v1.2.3