From cbca430062cd39158d0e0830a429a8988ce667d5 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 23 May 2007 17:54:48 -0700 Subject: [PATCH] node.py: hush pyflakes warnings --- src/allmydata/node.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)) -- 2.45.2