mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-01 02:36:42 +00:00
startstop_node.py: fix bug with options passed to restart and enable restart --profile
This commit is contained in:
parent
3e4616f4ad
commit
594a104c71
@ -27,6 +27,9 @@ class RestartOptions(BasedirMixin, usage.Options):
|
||||
"instead of complaining that you should have used 'start' instead "
|
||||
"of 'restart'"],
|
||||
]
|
||||
optFlags = [
|
||||
["profile", "p", "whether to run under the Python profiler, putting results in \"profiling_results.prof\""],
|
||||
]
|
||||
|
||||
def do_start(basedir, profile=False, out=sys.stdout, err=sys.stderr):
|
||||
print >>out, "STARTING", basedir
|
||||
@ -125,7 +128,7 @@ def restart(config, stdout, stderr):
|
||||
print >>stderr, "not restarting"
|
||||
return rc
|
||||
for basedir in config['basedirs']:
|
||||
rc = do_start(basedir, stdout, stderr) or rc
|
||||
rc = do_start(basedir, config['profile'], stdout, stderr) or rc
|
||||
return rc
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user