summaryrefslogtreecommitdiffstats
path: root/module/PluginThread.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r--module/PluginThread.py10
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()