From 0349b81a10d2937897f30031c4dedb49aa132d8c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 12 May 2015 02:00:28 +0200 Subject: 'from os' -> 'import os' and so on... --- pyload/Thread/Plugin.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pyload/Thread/Plugin.py') 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: -- cgit v1.2.3