From 20079e30196130dbdc773da3253e433fef899209 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Fri, 21 Sep 2007 15:03:15 -0700 Subject: [PATCH] startstop_node.py: don't pass config to do_start() and do_stop() --- src/allmydata/scripts/startstop_node.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 -- 2.45.2