From: Zooko O'Whielacronx Date: Fri, 21 Sep 2007 22:03:15 +0000 (-0700) Subject: startstop_node.py: don't pass config to do_start() and do_stop() X-Git-Tag: allmydata-tahoe-0.6.0~21 X-Git-Url: https://git.rkrishnan.org/components/%22news.html/reliability?a=commitdiff_plain;h=20079e30196130dbdc773da3253e433fef899209;p=tahoe-lafs%2Ftahoe-lafs.git startstop_node.py: don't pass config to do_start() and do_stop() --- diff --git a/src/allmydata/scripts/startstop_node.py b/src/allmydata/scripts/startstop_node.py index 96df1f71..c2d7df48 100644 --- a/src/allmydata/scripts/startstop_node.py +++ b/src/allmydata/scripts/startstop_node.py @@ -25,7 +25,7 @@ class RestartOptions(BasedirMixin, usage.Options): "of 'restart'"], ] -def do_start(basedir, config, out=sys.stdout, err=sys.stderr): +def do_start(basedir, out=sys.stdout, err=sys.stderr): print >>out, "STARTING", basedir if os.path.exists(os.path.join(basedir, "client.tac")): tac = "client.tac" @@ -66,7 +66,7 @@ def do_start(basedir, config, out=sys.stdout, err=sys.stderr): print >>err, "%s node probably not started" % type return 1 -def do_stop(basedir, config, out=sys.stdout, err=sys.stderr): +def do_stop(basedir, out=sys.stdout, err=sys.stderr): print >>out, "STOPPING", basedir pidfile = os.path.join(basedir, "twistd.pid") if not os.path.exists(pidfile): @@ -100,19 +100,19 @@ def do_stop(basedir, config, out=sys.stdout, err=sys.stderr): def start(config, stdout, stderr): rc = 0 for basedir in config['basedirs']: - rc = do_start(basedir, config, stdout, stderr) or rc + rc = do_start(basedir, stdout, stderr) or rc return rc def stop(config, stdout, stderr): rc = 0 for basedir in config['basedirs']: - rc = do_stop(basedir, config, stdout, stderr) or rc + rc = do_stop(basedir, stdout, stderr) or rc return rc def restart(config, stdout, stderr): rc = 0 for basedir in config['basedirs']: - rc = do_stop(basedir, config, stdout, stderr) or rc + rc = do_stop(basedir, stdout, stderr) or rc if rc == 2 and config['force']: print >>stderr, "ignoring couldn't-stop" rc = 0 @@ -120,7 +120,7 @@ def restart(config, stdout, stderr): print >>stderr, "not restarting" return rc for basedir in config['basedirs']: - rc = do_start(basedir, config, stdout, stderr) or rc + rc = do_start(basedir, stdout, stderr) or rc return rc