Skip to content

Commit a677c08

Browse files
committed
1 parent c88684f commit a677c08

9 files changed

Lines changed: 26 additions & 22 deletions

File tree

‎locale/pavement.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def get_source(options):
134134
urlretrieve(options.src, "pyload_src.zip")
135135
zip = ZipFile("pyload_src.zip")
136136
zip.extractall()
137-
path("pyload_src.zip").reshutil.move()
137+
path("pyload_src.zip").remove()
138138

139139
folder = [x for x in path(".").dirs() if x.name.startswith("spoob-pyload-")][0]
140140
folder.shutil.move(pyload)
@@ -146,8 +146,8 @@ def get_source(options):
146146
if file.name.endswith(".py"):
147147
file.chmod(0755)
148148

149-
(pyload / ".hgtags").reshutil.move()
150-
(pyload / ".gitignore").reshutil.move()
149+
(pyload / ".hgtags").remove()
150+
(pyload / ".gitignore").remove()
151151
#(pyload / "docs").rmtree()
152152

153153
f = open(pyload / "__init__.py", "wb")
@@ -247,9 +247,9 @@ def generate_locale():
247247

248248
makepot("django", path("pyload/web"), EXCLUDE, "./%s\n" % trans.relpath(), [".py", ".html"], ["--language=Python"])
249249

250-
trans.reshutil.move()
250+
trans.remove()
251251

252-
path("includes.txt").reshutil.move()
252+
path("includes.txt").remove()
253253

254254
print "Locale generated"
255255

@@ -409,7 +409,7 @@ def makepot(domain, p, excludes=[], includes="", endings=[".py"], xxargs=[]):
409409
with open("%s.po" % domain, "rb") as f:
410410
content = f.read()
411411

412-
path("%s.po" % domain).reshutil.move()
412+
path("%s.po" % domain).remove()
413413
content = content.replace("charset=CHARSET", "charset=UTF-8")
414414

415415
with open("locale/%s.pot" % domain, "wb") as f:

‎pyload/Core.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def writePidFile(self):
174174
def deletePidFile(self):
175175
if self.checkPidFile():
176176
self.log.debug("Deleting old pidfile %s" % self.pidfile)
177-
os.reshutil.move(self.pidfile)
177+
os.remove(self.pidfile)
178178

179179

180180
def checkPidFile(self):

‎pyload/cli/Cli.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ def printOnlineCheck(self, client, rid):
359359
break
360360

361361

362-
class RefreshThread(Thread):
362+
class RefreshThread(threading.Thread):
363363

364364
def __init__(self, cli):
365-
Thread.__init__(self)
365+
threading.Thread.__init__(self)
366366
self.setDaemon(True)
367367
self.cli = cli
368368

‎pyload/database/Backend.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ def wait(self):
115115
self.done.wait()
116116

117117

118-
class DatabaseBackend(Thread):
118+
class DatabaseBackend(threading.Thread):
119119
subs = []
120120

121121

122122
def __init__(self, core):
123-
Thread.__init__(self)
123+
threading.Thread.__init__(self)
124124
self.setDaemon(True)
125125
self.core = core
126126

@@ -322,7 +322,7 @@ def registerSub(cls, klass):
322322

323323
@classmethod
324324
def unregisterSub(cls, klass):
325-
cls.subs.reshutil.move(klass)
325+
cls.subs.remove(klass)
326326

327327

328328
def __getattr__(self, attr):

‎pyload/manager/Remote.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# -*- coding: utf-8 -*-
22
# @author: RaNaN
33

4+
import threading
45
import traceback
56

67

7-
class BackendBase(Thread):
8+
class BackendBase(threading.Thread):
89

910
def __init__(self, manager):
10-
Thread.__init__(self)
11+
threading.Thread.__init__(self)
1112
self.m = manager
1213
self.core = manager.core
1314
self.enabled = True

‎pyload/manager/thread/Plugin.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from __future__ import with_statement
55

6+
import threading
67
import traceback
78

89
from Queue import Queue
@@ -21,12 +22,12 @@
2122
from pyload.utils import fs_join
2223

2324

24-
class PluginThread(Thread):
25+
class PluginThread(threading.Thread):
2526
"""abstract base class for thread types"""
2627

2728
def __init__(self, manager):
2829
"""Constructor"""
29-
Thread.__init__(self)
30+
threading.Thread.__init__(self)
3031
self.setDaemon(True)
3132
self.m = manager #: thread manager
3233

‎pyload/network/HTTPDownload.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ def _copyChunks(self):
9696
fo.write(data)
9797
if fo.tell() < self.info.getChunkRange(i)[1]:
9898
reshutil.move(init)
99-
self.info.reshutil.move() #: there are probably invalid chunks
99+
self.info.remove() #: there are probably invalid chunks
100100
raise Exception("Downloaded content was smaller than expected. Try to reduce download connections.")
101101
reshutil.move(fname) #: remove chunk
102102

103103
if self.nameDisposition and self.disposition:
104104
self.filename = fs_join(dirname(self.filename), self.nameDisposition)
105105

106106
shutil.move(init, fs_encode(self.filename))
107-
self.info.reshutil.move() #: remove info file
107+
self.info.remove() #: remove info file
108108

109109

110110
def download(self, chunks=1, resume=False):
@@ -239,7 +239,7 @@ def _download(self, chunks, resume):
239239
to_clean = filter(lambda x: x is not init, self.chunks)
240240
for chunk in to_clean:
241241
self.closeChunk(chunk)
242-
self.chunks.reshutil.move(chunk)
242+
self.chunks.remove(chunk)
243243
reshutil.move(fs_encode(self.info.getChunkName(chunk.id)))
244244

245245
# let first chunk load the rest and update the info file

‎pyload/plugin/addon/IRCInterface.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import socket
55
import ssl
66
import time
7+
import threading
78
import traceback
89

910
import pycurl
@@ -38,7 +39,7 @@ class IRCInterface(Thread, Addon):
3839

3940

4041
def __init__(self, core, manager):
41-
Thread.__init__(self)
42+
threading.Thread.__init__(self)
4243
Addon.__init__(self, core, manager)
4344
self.setDaemon(True)
4445

‎tests/APIExerciser.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import gc
77
import random
88
import string
9+
import threading
910
import traceback
1011

1112
from math import floor
@@ -38,12 +39,12 @@ def startApiExerciser(core, n):
3839
APIExerciser(core).start()
3940

4041

41-
class APIExerciser(Thread):
42+
class APIExerciser(threading.Thread):
4243

4344
def __init__(self, core, thrift=False, user=None, pw=None):
4445
global idPool
4546

46-
Thread.__init__(self)
47+
threading.Thread.__init__(self)
4748
self.setDaemon(True)
4849
self.core = core
4950
self.count = 0 #: number of methods

0 commit comments

Comments
 (0)