diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-08-31 20:16:07 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-08-31 20:16:07 +0200 |
commit | 0dddcf50a6ab466c47c600b2eed1f7b6de6e1d6c (patch) | |
tree | 8d2440fc0bb262b4f69dac7637f57bffd9908fec /module/PluginThread.py | |
parent | closed #357, #384 (diff) | |
download | pyload-0dddcf50a6ab466c47c600b2eed1f7b6de6e1d6c.tar.xz |
fixes new debug reports, bad header detection
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r-- | module/PluginThread.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index ffc866a3a..ceeb0dfc5 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -33,9 +33,9 @@ from pycurl import error from PyFile import PyFile from plugins.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload from common.packagetools import parseNames +from utils import save_join from remote.thriftbackend.thriftgen.pyload.ttypes import OnlineStatus - class PluginThread(Thread): """abstract base class for thread types""" @@ -77,9 +77,13 @@ class PluginThread(Thread): zip = zipfile.ZipFile(dump_name, "w") for f in listdir(join("tmp", pyfile.pluginname)): - zip.write(join("tmp", pyfile.pluginname, f), join(pyfile.pluginname, f)) + try: + # avoid encoding errors + zip.write(join("tmp", pyfile.pluginname, f), save_join(pyfile.pluginname, f)) + except: + pass - zip.writestr(join(pyfile.pluginname, "debug_Report.txt"), self.writeDebugFile(pyfile)) + zip.writestr(save_join(pyfile.pluginname, "debug_Report.txt"), self.writeDebugFile(pyfile)) zip.close() |