1234567891011121314151617181920212223242526272829303132333435 |
- diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
- index bf26978..73f4e5f 100644
- --- a/lib/chutney/TorNet.py
- +++ b/lib/chutney/TorNet.py
- @@ -682,7 +682,7 @@ class LocalNodeController(NodeController):
- def waitOnLaunch(self):
- """Check whether we can wait() for the tor process to launch"""
- # TODO: is this the best place for this code?
- - # RunAsDaemon default is 0
- + # RunAsDaemon default is 1
- runAsDaemon = False
- with open(self._getTorrcFname(), 'r') as f:
- for line in f.readlines():
- @@ -691,7 +691,7 @@ class LocalNodeController(NodeController):
- if len(stline) > 0:
- splline = stline.split()
- # if the line has at least two tokens on it
- - if (len(splline) > 0 and
- + if (len(splline) > 1 and
- splline[0].lower() == "RunAsDaemon".lower() and
- splline[1] == "1"):
- # use the RunAsDaemon value from the torrc
- @@ -874,9 +874,9 @@ class TorEnviron(chutney.Templating.Environ):
- ocp_line = ('__OwningControllerProcess %d' % (cpid))
- # if we want to leave the network running, or controlling_pid is 1
- # (or invalid)
- - if (os.environ.get('CHUTNEY_START_TIME', 0) < 0 or
- - os.environ.get('CHUTNEY_BOOTSTRAP_TIME', 0) < 0 or
- - os.environ.get('CHUTNEY_STOP_TIME', 0) < 0 or
- + if (int(os.environ.get('CHUTNEY_START_TIME', 0)) < 0 or
- + int(os.environ.get('CHUTNEY_BOOTSTRAP_TIME', 0)) < 0 or
- + int(os.environ.get('CHUTNEY_STOP_TIME', 0)) < 0 or
- cpid <= 1):
- return '#' + ocp_line
- else:
|