summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-09 23:24:08 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-09 23:24:08 +0200
commita677c082aeabba00a079db581bfae194d069cf11 (patch)
tree5fa099c37aa241f9a0ef7ba6d2994b01d9e1df2f
parentRemove old .pot files (diff)
downloadpyload-a677c082aeabba00a079db581bfae194d069cf11.tar.xz
Fix https://github.com/pyload/pyload/issues/1406
-rw-r--r--locale/pavement.py12
-rwxr-xr-xpyload/Core.py2
-rw-r--r--pyload/cli/Cli.py4
-rw-r--r--pyload/database/Backend.py6
-rw-r--r--pyload/manager/Remote.py5
-rw-r--r--pyload/manager/thread/Plugin.py5
-rw-r--r--pyload/network/HTTPDownload.py6
-rw-r--r--pyload/plugin/addon/IRCInterface.py3
-rw-r--r--tests/APIExerciser.py5
9 files changed, 26 insertions, 22 deletions
diff --git a/locale/pavement.py b/locale/pavement.py
index fb52243a6..c2820fade 100644
--- a/locale/pavement.py
+++ b/locale/pavement.py
@@ -134,7 +134,7 @@ def get_source(options):
urlretrieve(options.src, "pyload_src.zip")
zip = ZipFile("pyload_src.zip")
zip.extractall()
- path("pyload_src.zip").reshutil.move()
+ path("pyload_src.zip").remove()
folder = [x for x in path(".").dirs() if x.name.startswith("spoob-pyload-")][0]
folder.shutil.move(pyload)
@@ -146,8 +146,8 @@ def get_source(options):
if file.name.endswith(".py"):
file.chmod(0755)
- (pyload / ".hgtags").reshutil.move()
- (pyload / ".gitignore").reshutil.move()
+ (pyload / ".hgtags").remove()
+ (pyload / ".gitignore").remove()
#(pyload / "docs").rmtree()
f = open(pyload / "__init__.py", "wb")
@@ -247,9 +247,9 @@ def generate_locale():
makepot("django", path("pyload/web"), EXCLUDE, "./%s\n" % trans.relpath(), [".py", ".html"], ["--language=Python"])
- trans.reshutil.move()
+ trans.remove()
- path("includes.txt").reshutil.move()
+ path("includes.txt").remove()
print "Locale generated"
@@ -409,7 +409,7 @@ def makepot(domain, p, excludes=[], includes="", endings=[".py"], xxargs=[]):
with open("%s.po" % domain, "rb") as f:
content = f.read()
- path("%s.po" % domain).reshutil.move()
+ path("%s.po" % domain).remove()
content = content.replace("charset=CHARSET", "charset=UTF-8")
with open("locale/%s.pot" % domain, "wb") as f:
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)
diff --git a/tests/APIExerciser.py b/tests/APIExerciser.py
index 9ff37bdc9..25eb666d7 100644
--- a/tests/APIExerciser.py
+++ b/tests/APIExerciser.py
@@ -6,6 +6,7 @@ from __future__ import with_statement
import gc
import random
import string
+import threading
import traceback
from math import floor
@@ -38,12 +39,12 @@ def startApiExerciser(core, n):
APIExerciser(core).start()
-class APIExerciser(Thread):
+class APIExerciser(threading.Thread):
def __init__(self, core, thrift=False, user=None, pw=None):
global idPool
- Thread.__init__(self)
+ threading.Thread.__init__(self)
self.setDaemon(True)
self.core = core
self.count = 0 #: number of methods