[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [chutney/master] Allow warnings from within runConfigFile
commit ced12d75dbbf305a4ddd2de37285a5216aee4d2f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Feb 28 11:33:32 2019 -0500
Allow warnings from within runConfigFile
The lack of "global" here, and the lack of putting a warning count
in the globals, was running us into trouble.
---
lib/chutney/TorNet.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 8a2329a..82d50cf 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -399,6 +399,8 @@ class LocalNodeBuilder(NodeBuilder):
If checkOnly, just make sure that the formatting is indeed
possible.
"""
+ global torrc_option_warn_count
+
fn_out = self._getTorrcFname()
torrc_template = self._getTorrcTemplate()
output = torrc_template.format(self._env)
@@ -1190,7 +1192,9 @@ def runConfigFile(verb, data):
_GLOBALS = dict(_BASE_ENVIRON=_BASE_ENVIRON,
Node=Node,
ConfigureNodes=ConfigureNodes,
- _THE_NETWORK=_THE_NETWORK)
+ _THE_NETWORK=_THE_NETWORK,
+ torrc_option_warn_count=0,
+ TORRC_OPTION_WARN_LIMIT=10)
exec(data, _GLOBALS)
network = _GLOBALS['_THE_NETWORK']
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits