diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 02:00:28 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 03:22:29 +0200 |
commit | 0349b81a10d2937897f30031c4dedb49aa132d8c (patch) | |
tree | 3db2827cd64888cc013e064d4e201b8a6ddbc7a9 /pyload/Thread/Plugin.py | |
parent | Merge pull request #12 from GammaC0de/GammaC0de-fix-api (diff) | |
download | pyload-0349b81a10d2937897f30031c4dedb49aa132d8c.tar.xz |
'from os' -> 'import os' and so on...
Diffstat (limited to 'pyload/Thread/Plugin.py')
-rw-r--r-- | pyload/Thread/Plugin.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pyload/Thread/Plugin.py b/pyload/Thread/Plugin.py index f8cfba9c4..264deb84c 100644 --- a/pyload/Thread/Plugin.py +++ b/pyload/Thread/Plugin.py @@ -3,13 +3,12 @@ from __future__ import with_statement +import os import threading import traceback from Queue import Queue from copy import copy -from os import listdir, stat -from os.path import join from pprint import pformat from sys import exc_info, exc_clear from time import sleep, time, strftime, gmtime @@ -45,10 +44,10 @@ class PluginThread(threading.Thread): zip = zipfile.ZipFile(dump_name, "w") - for f in listdir(join("tmp", pyfile.pluginname)): + for f in os.listdir(os.path.join("tmp", pyfile.pluginname)): try: # avoid encoding errors - zip.write(join("tmp", pyfile.pluginname, f), fs_join(pyfile.pluginname, f)) + zip.write(os.path.join("tmp", pyfile.pluginname, f), fs_join(pyfile.pluginname, f)) except Exception: pass @@ -58,7 +57,7 @@ class PluginThread(threading.Thread): zip.writestr(info, dump) zip.close() - if not stat(dump_name).st_size: + if not os.stat(dump_name).st_size: raise Exception("Empty Zipfile") except Exception, e: |