git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
0ca9aa7
)
fixed incompatibility with older versions of Twisted
author
Forrest Voight
<forrest@forre.st>
Mon, 15 Oct 2012 07:23:38 +0000 (
03:23
-0400)
committer
Forrest Voight
<forrest@forre.st>
Mon, 15 Oct 2012 07:23:38 +0000 (
03:23
-0400)
p2pool/util/deferral.py
patch
|
blob
|
history
diff --git
a/p2pool/util/deferral.py
b/p2pool/util/deferral.py
index
71fe633
..
0601d39
100644
(file)
--- a/
p2pool/util/deferral.py
+++ b/
p2pool/util/deferral.py
@@
-103,7
+103,10
@@
class GenericDeferrer(object):
def cancel(df):
df, timer = self.map.pop(id)
timer.cancel()
- df = defer.Deferred(cancel)
+ try:
+ df = defer.Deferred(cancel)
+ except TypeError:
+ df = defer.Deferred() # handle older versions of Twisted
def timeout():
self.map.pop(id)
df.errback(failure.Failure(defer.TimeoutError('in GenericDeferrer')))