From 524c9f1fc20decacf5c1e8a7be9ea16885ac557a Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Wed, 8 Aug 2007 21:43:48 -0700 Subject: [PATCH] startstop_node now works if the logs directory already exists Thanks to Arno and Arch for pointing this out. --- src/allmydata/scripts/startstop_node.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.45.2