]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
startstop_node now works if the logs directory already exists
authorZooko O'Whielacronx <zooko@zooko.com>
Thu, 9 Aug 2007 04:43:48 +0000 (21:43 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Thu, 9 Aug 2007 04:43:48 +0000 (21:43 -0700)
Thanks to Arno and Arch for pointing this out.

src/allmydata/scripts/startstop_node.py

index 5b6f0bf71d9e4d9853f7bbee93f44f669f068ac2..557578e56029ee046a81ee325392d6eef23f5f6b 100644 (file)
@@ -2,6 +2,7 @@
 import os, sys, signal, time, subprocess
 from twisted.python import usage
 from allmydata.scripts.common import BasedirMixin
+from allmydata.util import fileutil
 from twisted.python.procutils import which
 
 class StartOptions(BasedirMixin, usage.Options):
@@ -70,7 +71,7 @@ def do_start(basedir, config, out=sys.stdout, err=sys.stderr):
             print >>err, " in fact, it doesn't look like a directory at all!"
         sys.exit(1)
     twistd = find_twistd()
-    os.mkdir(os.path.join(basedir, "logs"))
+    fileutil.make_dirs(os.path.join(basedir, "logs"))
     cmd = ["python", twistd, "-y", tac, "--logfile", "logs/twistd.log"]
     rc = subprocess.call(cmd, cwd=basedir)
     if rc == 0: