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/Addon.py | 3 +-- pyload/Thread/Decrypter.py | 3 +-- pyload/Thread/Download.py | 3 +-- pyload/Thread/Info.py | 3 +-- pyload/Thread/Plugin.py | 9 ++++----- 5 files changed, 8 insertions(+), 13 deletions(-) (limited to 'pyload/Thread') diff --git a/pyload/Thread/Addon.py b/pyload/Thread/Addon.py index bf3b62eb1..49d470a8a 100644 --- a/pyload/Thread/Addon.py +++ b/pyload/Thread/Addon.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import os 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 diff --git a/pyload/Thread/Decrypter.py b/pyload/Thread/Decrypter.py index dcb18b929..62891433e 100644 --- a/pyload/Thread/Decrypter.py +++ b/pyload/Thread/Decrypter.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import os 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 diff --git a/pyload/Thread/Download.py b/pyload/Thread/Download.py index 77f4f163f..be9a1c7ef 100644 --- a/pyload/Thread/Download.py +++ b/pyload/Thread/Download.py @@ -1,14 +1,13 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import os import traceback import pycurl 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 diff --git a/pyload/Thread/Info.py b/pyload/Thread/Info.py index db1b6d79c..fbd60908e 100644 --- a/pyload/Thread/Info.py +++ b/pyload/Thread/Info.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import os 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 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