From: Zooko O'Whielacronx Date: Thu, 9 Aug 2007 04:43:48 +0000 (-0700) Subject: startstop_node now works if the logs directory already exists X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri//%22%22?a=commitdiff_plain;h=524c9f1fc20decacf5c1e8a7be9ea16885ac557a;p=tahoe-lafs%2Ftahoe-lafs.git startstop_node now works if the logs directory already exists Thanks to Arno and Arch for pointing this out. --- diff --git a/src/allmydata/scripts/startstop_node.py b/src/allmydata/scripts/startstop_node.py index 5b6f0bf7..557578e5 100644 --- a/src/allmydata/scripts/startstop_node.py +++ b/src/allmydata/scripts/startstop_node.py @@ -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: