summaryrefslogtreecommitdiffstats
path: root/module/threads
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-03 20:41:23 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-03 20:41:23 +0100
commit4a3a81b63cd85cc3dcd9669868a2079da65838a2 (patch)
treefab8d99437bfc8d0fbd9deba18aa2da0f61aaae4 /module/threads
parentupdate mediafire, easybytez (diff)
downloadpyload-4a3a81b63cd85cc3dcd9669868a2079da65838a2.tar.xz
fixes for old style decrypter
Diffstat (limited to 'module/threads')
-rw-r--r--module/threads/BaseThread.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/module/threads/BaseThread.py b/module/threads/BaseThread.py
index 1ba3f7a9f..f4885aadc 100644
--- a/module/threads/BaseThread.py
+++ b/module/threads/BaseThread.py
@@ -12,7 +12,7 @@ from types import MethodType
from pprint import pformat
from traceback import format_exc
-from module.utils.fs import listdir, join, save_join, stat
+from module.utils.fs import listdir, join, save_join, stat, exists
class BaseThread(Thread):
"""abstract base class for thread types"""
@@ -37,17 +37,22 @@ class BaseThread(Thread):
zip = zipfile.ZipFile(dump_name, "w")
- for f in listdir(join("tmp", name)):
- try:
- # avoid encoding errors
- zip.write(join("tmp", name, f), save_join(name, f))
- except:
- pass
+ if exists(join("tmp", name)):
+ for f in listdir(join("tmp", name)):
+ try:
+ # avoid encoding errors
+ zip.write(join("tmp", name, f), save_join(name, f))
+ except:
+ pass
info = zipfile.ZipInfo(save_join(name, "debug_Report.txt"), gmtime())
info.external_attr = 0644 << 16L # change permissions
-
zip.writestr(info, dump)
+
+ info = zipfile.ZipInfo(save_join(name, "system_Report.txt"), gmtime())
+ info.external_attr = 0644 << 16L
+ zip.writestr(info, self.getSystemDump())
+
zip.close()
if not stat(dump_name).st_size: