mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
startstop_node.py: find twistd.py in sys.prefix/scripts if there isn't a twistd executable on the path
This commit is contained in:
parent
fe899da1b0
commit
28b2c19f1e
@ -39,10 +39,12 @@ def do_start(basedir, config, out=sys.stdout, err=sys.stderr):
|
||||
print >>err, " in fact, it doesn't look like a directory at all!"
|
||||
return 1
|
||||
twistds = which("twistd")
|
||||
if not twistds:
|
||||
twistd = twistds and twistds[0]
|
||||
if not twistd:
|
||||
twistd = os.path.join(sys.prefix, 'Scripts', 'twistd.py')
|
||||
if not os.path.exists(twistd):
|
||||
print "Can't find twistd (it comes with Twisted). Aborting."
|
||||
sys.exit(1)
|
||||
twistd = twistds[0]
|
||||
path, ext = os.path.splitext(twistd)
|
||||
if ext.lower() in [".exe", ".bat",]:
|
||||
cmd = [twistd,]
|
||||
|
Loading…
Reference in New Issue
Block a user