[svn r63159] re-group methods

--HG--
branch : trunk
This commit is contained in:
hpk 2009-03-20 22:17:15 +01:00
parent 1b3384b7bd
commit 7b82c6bb27
1 changed files with 15 additions and 14 deletions

View File

@ -14,18 +14,8 @@ class NodeManager(object):
self.gwmanager = GatewayManager(specs) self.gwmanager = GatewayManager(specs)
self.nodes = [] self.nodes = []
def makegateways(self): def trace(self, msg):
# we change to the topdir sot that self.config.bus.notify("trace", "nodemanage", msg)
# PopenGateways will have their cwd
# such that unpickling configs will
# pick it up as the right topdir
# (for other gateways this chdir is irrelevant)
old = self.config.topdir.chdir()
try:
self.gwmanager.makegateways()
finally:
old.chdir()
self.trace_nodestatus()
def trace_nodestatus(self): def trace_nodestatus(self):
if self.config.option.debug: if self.config.option.debug:
@ -60,8 +50,19 @@ class NodeManager(object):
# and cd into it # and cd into it
self.gwmanager.multi_chdir(self.config.topdir.basename, inplacelocal=False) self.gwmanager.multi_chdir(self.config.topdir.basename, inplacelocal=False)
def trace(self, msg): def makegateways(self):
self.config.bus.notify("trace", "nodemanage", msg) # we change to the topdir sot that
# PopenGateways will have their cwd
# such that unpickling configs will
# pick it up as the right topdir
# (for other gateways this chdir is irrelevant)
old = self.config.topdir.chdir()
try:
self.gwmanager.makegateways()
finally:
old.chdir()
self.trace_nodestatus()
def setup_nodes(self, putevent): def setup_nodes(self, putevent):
self.rsync_roots() self.rsync_roots()