commit 735cb2dd6740bc7ecb5b3c5810fc6bf2e2be7597 Author: Qingping Hou dave2008713@gmail.com Date: Mon Feb 17 23:25:24 2014 -0500
support setting tor and tor-gencert path by environment variables --- lib/chutney/TorNet.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py index 74ec087..fed80c4 100644 --- a/lib/chutney/TorNet.py +++ b/lib/chutney/TorNet.py @@ -485,7 +485,8 @@ DEFAULTS = { 'bridge' : False, 'connlimit' : 60, 'net_base_dir' : 'net', - 'tor' : 'tor', + 'tor' : os.environ.get('CHUTNEY_TOR', 'tor'), + 'tor-gencert' : os.environ.get('CHUTNEY_TOR_GENCERT', None), 'auth_cert_lifetime' : 12, 'ip' : '127.0.0.1', 'ipv6_addr' : None, @@ -547,7 +548,10 @@ class TorEnviron(chutney.Templating.Environ): return "test%03d%s"%(my['nodenum'], my['tag'])
def _get_tor_gencert(self, my): - return my['tor']+"-gencert" + if my['tor-gencert']: + return my['tor-gencert'] + else: + return '{0}-gencert'.format(my['tor'])
def _get_auth_passphrase(self, my): return self['nick'] # OMG TEH SECURE!
tor-commits@lists.torproject.org