diff options
-rw-r--r-- | module/file_list.py | 5 | ||||
-rwxr-xr-x | pyLoadCore.py | 16 |
2 files changed, 11 insertions, 10 deletions
diff --git a/module/file_list.py b/module/file_list.py index 7b886cc2c..c95eefcec 100644 --- a/module/file_list.py +++ b/module/file_list.py @@ -28,6 +28,7 @@ from download_thread import Status import cPickle import re import module.Plugin +from os import sep class NoSuchElementException(Exception): pass @@ -51,7 +52,7 @@ class File_List(object): def load(self): self.lock.acquire() try: - pkl_file = open('links.pkl', 'rb') + pkl_file = open('module' + sep + 'links.pkl', 'rb') obj = cPickle.load(pkl_file) except: obj = False @@ -112,7 +113,7 @@ class File_List(object): pdata["queue"] = queue pdata["collector"] = collector - output = open('links.pkl', 'wb') + output = open('module' + sep + 'links.pkl', 'wb') cPickle.dump(pdata, output, -1) self.lock.release() diff --git a/pyLoadCore.py b/pyLoadCore.py index b38772d6d..cb6714f85 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -53,8 +53,6 @@ except ImportError: exit() from module.file_list import File_List from module.thread_list import Thread_List -from module.web.WebServer import WebServer -#from module.remote.SecureXMLRPCServer import SecureXMLRPCServer from module.network.Request import Request import thread @@ -118,7 +116,6 @@ class Core(object): translation = gettext.translation("pyLoad", "locale", languages=[self.config['general']['language']]) translation.install(unicode=True) - #check_file(self, check_name, legend, folder=True, empty=True, essential=False): self.check_install("pycurl", "pycurl for lower memory footprint while downloading") self.check_install("tesseract", "tesseract for captcha reading", False) self.check_install("gocr", "gocr for captcha reading", False) @@ -132,11 +129,9 @@ class Core(object): if self.config['general']['debug_mode']: self.init_logger(logging.DEBUG) # logging level - self.print_test_status = True else: self.init_logger(logging.INFO) # logging level - self.print_test_status = False - + self.check_update() self.logger.info(_("Downloadtime: %s") % self.is_time_download()) # debug only @@ -148,7 +143,7 @@ class Core(object): self.file_list = File_List(self) self.thread_list = Thread_List(self) - + self.read_url_list(self.config['general']['link_file']) while True: @@ -402,4 +397,9 @@ class Core(object): if __name__ == "__main__": pyload_core = Core() - pyload_core.start() + try: + pyload_core.start() + except KeyboardInterrupt: + pyload_core.logger.info("killed pyLoad by Terminal") + exit() + |