From: robk-org Date: Tue, 5 Jun 2007 01:46:37 +0000 (-0700) Subject: catch failures in startService() and abort process X-Git-Tag: allmydata-tahoe-0.3.0~30 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/%22news.html/?a=commitdiff_plain;h=7c479ba8a7454e85c76543f3b7783e6f86f839ee;p=tahoe-lafs%2Ftahoe-lafs.git catch failures in startService() and abort process --- diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 365f9497..6fcc0f09 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -86,6 +86,13 @@ class Node(service.MultiService): self._tub_ready_observerlist.fire(self) return self d.addCallback(_ready) + def _die(failure): + self.log('_startService() failed') + log.err(failure) + #reactor.stop() # for unknown reasons, reactor.stop() isn't working. [ ] TODO + self.log('calling os.abort()') + os.abort() + d.addErrback(_die) def stopService(self): self.log("Node.stopService")