]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
startstop_node.py: fix bug with options passed to restart and enable restart --profile
authorZooko O'Whielacronx <zooko@zooko.com>
Fri, 21 Sep 2007 22:48:15 +0000 (15:48 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Fri, 21 Sep 2007 22:48:15 +0000 (15:48 -0700)
src/allmydata/scripts/startstop_node.py

index 3988ec3e29dc8eced6d60905bab635dbf57fd922..ec4fa724420d17252a4543a6d0928ed3364f40ae 100644 (file)
@@ -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