From: Brian Warner Date: Thu, 24 May 2007 00:54:48 +0000 (-0700) Subject: node.py: hush pyflakes warnings X-Git-Tag: allmydata-tahoe-0.3.0~57 X-Git-Url: https://git.rkrishnan.org/uri//%22%22?a=commitdiff_plain;h=cbca430062cd39158d0e0830a429a8988ce667d5;p=tahoe-lafs%2Ftahoe-lafs.git node.py: hush pyflakes warnings --- diff --git a/src/allmydata/node.py b/src/allmydata/node.py index c55fd413..58e6132a 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -5,7 +5,7 @@ from twisted.application import service from twisted.internet import defer, reactor from foolscap import Tub, eventual from allmydata.util import idlib, iputil, observer -from allmydata.util.assertutil import _assert, precondition +from allmydata.util.assertutil import precondition # Just to get their versions: @@ -62,10 +62,14 @@ class Node(service.MultiService): self.log("Node constructed. tahoe version: %s, foolscap version: %s, zfec version: %s" % (allmydata.__version__, foolscap.__version__, zfec.__version__,)) + + def startService(self): + # note: this class can only be started and stopped once. + eventual.eventually(self._startService) + def _startService(self): precondition(reactor.running) - # note: this class can only be started and stopped once. service.MultiService.startService(self) d = defer.succeed(None) d.addCallback(lambda res: iputil.get_local_addresses_async()) @@ -77,9 +81,6 @@ class Node(service.MultiService): return self d.addCallback(_ready) - def startService(self): - foolscap.eventual.eventually(self._startService) - def stopService(self): d = self._tub_ready_observerlist.when_fired() d.addCallback(lambda ignored_result: service.MultiService.stopService(self))