Skip to content

Commit

Permalink
remove dead code (CancelableDeferred, ingoreStaleRefs)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Feb 22, 2010
1 parent e7ae4cd commit 5f2ff04
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions buildbot/util/__init__.py
Expand Up @@ -56,27 +56,6 @@ def formatInterval(eta):
eta_parts.append("%d secs" % eta)
return ", ".join(eta_parts)

class CancelableDeferred(Deferred):
"""I am a version of Deferred that can be canceled by calling my
.cancel() method. After being canceled, no callbacks or errbacks will be
executed.
"""
def __init__(self):
Deferred.__init__(self)
self.canceled = 0
def cancel(self):
self.canceled = 1
def _runCallbacks(self):
if self.canceled:
self.callbacks = []
return
Deferred._runCallbacks(self)

def ignoreStaleRefs(failure):
"""d.addErrback(util.ignoreStaleRefs)"""
failure.trap(pb.DeadReferenceError, pb.PBConnectionLost)
return None

class _None:
pass

Expand Down

0 comments on commit 5f2ff04

Please sign in to comment.