# particular we want to log any local errors caused by coding
# problems.
+ if f.check(DeadReferenceError):
+ return
if f.check(RemoteException):
if f.value.failure.check(KeyError, IndexError, NameError):
# this may ignore a bit too much, but that only hurts us
# particular we want to log any local errors caused by coding
# problems.
+ if f.check(DeadReferenceError):
+ return
if f.check(RemoteException):
if f.value.failure.check(KeyError, IndexError, NameError):
# this may ignore a bit too much, but that only hurts us
from twisted.application.internet import TimerService
from zope.interface import implements
from foolscap.api import eventually, DeadReferenceError, Referenceable, Tub
-from twisted.internet.error import ConnectionDone, ConnectionLost
from allmydata.util import log
from allmydata.interfaces import RIStatsProvider, RIStatsGatherer, IStatsProducer
# this is called lazily, when a get_stats request fails
del self.clients[tubid]
del self.nicknames[tubid]
- f.trap(DeadReferenceError, ConnectionDone, ConnectionLost)
+ f.trap(DeadReferenceError)
def log_client_error(self, f, tubid):
log.msg("StatsGatherer: error in get_stats(), peerid=%s" % tubid,
from twisted.trial import unittest
from twisted.internet import defer
from twisted.internet import threads # CLI tests use deferToThread
-from twisted.internet.error import ConnectionDone, ConnectionLost
import allmydata
from allmydata import uri
from allmydata.storage.mutable import MutableShareFile
self.fail("interrupted upload should have failed, not finished"
" with result %s" % (res,))
def _interrupted(f):
- f.trap(ConnectionLost, ConnectionDone, DeadReferenceError)
+ f.trap(DeadReferenceError)
# make sure we actually interrupted it before finishing the
# file
pass
def trap_deadref(f):
- f.trap(DeadReferenceError)
- pass
+ return trap_and_discard(f, DeadReferenceError)