diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-09 23:24:08 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-09 23:24:08 +0200 |
commit | a677c082aeabba00a079db581bfae194d069cf11 (patch) | |
tree | 5fa099c37aa241f9a0ef7ba6d2994b01d9e1df2f /pyload | |
parent | Remove old .pot files (diff) | |
download | pyload-a677c082aeabba00a079db581bfae194d069cf11.tar.xz |
Fix https://github.com/pyload/pyload/issues/1406
Diffstat (limited to 'pyload')
-rwxr-xr-x | pyload/Core.py | 2 | ||||
-rw-r--r-- | pyload/cli/Cli.py | 4 | ||||
-rw-r--r-- | pyload/database/Backend.py | 6 | ||||
-rw-r--r-- | pyload/manager/Remote.py | 5 | ||||
-rw-r--r-- | pyload/manager/thread/Plugin.py | 5 | ||||
-rw-r--r-- | pyload/network/HTTPDownload.py | 6 | ||||
-rw-r--r-- | pyload/plugin/addon/IRCInterface.py | 3 |
7 files changed, 17 insertions, 14 deletions
diff --git a/pyload/Core.py b/pyload/Core.py index 0de19abbf..2230b3fed 100755 --- a/pyload/Core.py +++ b/pyload/Core.py @@ -174,7 +174,7 @@ class Core(object): def deletePidFile(self): if self.checkPidFile(): self.log.debug("Deleting old pidfile %s" % self.pidfile) - os.reshutil.move(self.pidfile) + os.remove(self.pidfile) def checkPidFile(self): diff --git a/pyload/cli/Cli.py b/pyload/cli/Cli.py index 812212d31..617b65b0f 100644 --- a/pyload/cli/Cli.py +++ b/pyload/cli/Cli.py @@ -359,10 +359,10 @@ class Cli(object): break -class RefreshThread(Thread): +class RefreshThread(threading.Thread): def __init__(self, cli): - Thread.__init__(self) + threading.Thread.__init__(self) self.setDaemon(True) self.cli = cli diff --git a/pyload/database/Backend.py b/pyload/database/Backend.py index 9acca287c..3262e6155 100644 --- a/pyload/database/Backend.py +++ b/pyload/database/Backend.py @@ -115,12 +115,12 @@ class DatabaseJob(object): self.done.wait() -class DatabaseBackend(Thread): +class DatabaseBackend(threading.Thread): subs = [] def __init__(self, core): - Thread.__init__(self) + threading.Thread.__init__(self) self.setDaemon(True) self.core = core @@ -322,7 +322,7 @@ class DatabaseBackend(Thread): @classmethod def unregisterSub(cls, klass): - cls.subs.reshutil.move(klass) + cls.subs.remove(klass) def __getattr__(self, attr): diff --git a/pyload/manager/Remote.py b/pyload/manager/Remote.py index 3c6dabefa..6023cdcfd 100644 --- a/pyload/manager/Remote.py +++ b/pyload/manager/Remote.py @@ -1,13 +1,14 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import threading import traceback -class BackendBase(Thread): +class BackendBase(threading.Thread): def __init__(self, manager): - Thread.__init__(self) + threading.Thread.__init__(self) self.m = manager self.core = manager.core self.enabled = True diff --git a/pyload/manager/thread/Plugin.py b/pyload/manager/thread/Plugin.py index 2621bc861..0163152f3 100644 --- a/pyload/manager/thread/Plugin.py +++ b/pyload/manager/thread/Plugin.py @@ -3,6 +3,7 @@ from __future__ import with_statement +import threading import traceback from Queue import Queue @@ -21,12 +22,12 @@ from pyload.utils.packagetools import parseNames from pyload.utils import fs_join -class PluginThread(Thread): +class PluginThread(threading.Thread): """abstract base class for thread types""" def __init__(self, manager): """Constructor""" - Thread.__init__(self) + threading.Thread.__init__(self) self.setDaemon(True) self.m = manager #: thread manager diff --git a/pyload/network/HTTPDownload.py b/pyload/network/HTTPDownload.py index 2276af609..62cef457b 100644 --- a/pyload/network/HTTPDownload.py +++ b/pyload/network/HTTPDownload.py @@ -96,7 +96,7 @@ class HTTPDownload(object): fo.write(data) if fo.tell() < self.info.getChunkRange(i)[1]: reshutil.move(init) - self.info.reshutil.move() #: there are probably invalid chunks + self.info.remove() #: there are probably invalid chunks raise Exception("Downloaded content was smaller than expected. Try to reduce download connections.") reshutil.move(fname) #: remove chunk @@ -104,7 +104,7 @@ class HTTPDownload(object): self.filename = fs_join(dirname(self.filename), self.nameDisposition) shutil.move(init, fs_encode(self.filename)) - self.info.reshutil.move() #: remove info file + self.info.remove() #: remove info file def download(self, chunks=1, resume=False): @@ -239,7 +239,7 @@ class HTTPDownload(object): to_clean = filter(lambda x: x is not init, self.chunks) for chunk in to_clean: self.closeChunk(chunk) - self.chunks.reshutil.move(chunk) + self.chunks.remove(chunk) reshutil.move(fs_encode(self.info.getChunkName(chunk.id))) # let first chunk load the rest and update the info file diff --git a/pyload/plugin/addon/IRCInterface.py b/pyload/plugin/addon/IRCInterface.py index 3cf21b409..1d7683bf4 100644 --- a/pyload/plugin/addon/IRCInterface.py +++ b/pyload/plugin/addon/IRCInterface.py @@ -4,6 +4,7 @@ import re import socket import ssl import time +import threading import traceback import pycurl @@ -38,7 +39,7 @@ class IRCInterface(Thread, Addon): def __init__(self, core, manager): - Thread.__init__(self) + threading.Thread.__init__(self) Addon.__init__(self, core, manager) self.setDaemon(True) |