[tor-commits] [chutney/master] Fix borken print() function calls in lib/chutney/TorNet.py.
nickm at torproject.org
nickm at torproject.org
Thu Feb 18 17:27:29 UTC 2016
commit 5a63784d408e50924f3c38903fc28ae39bf7e0aa
Author: Isis Lovecruft <isis at torproject.org>
Date: Thu Feb 18 17:09:08 2016 +0000
Fix borken print() function calls in lib/chutney/TorNet.py.
The `%` operator needs to go inside the call to the `print()` function.
Otherwise, the format string operation is being done on the return value of
`print()`, which is `None`.
* FIXES #18341: https://bugs.torproject.org/18341.
---
lib/chutney/TorNet.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index c79f64b..327e1ed 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -252,7 +252,7 @@ class LocalNodeBuilder(NodeBuilder):
if e.errno == errno.ENOENT:
print ("Cannot find tor binary %r. Use "
"CHUTNEY_TOR environment variable to set the "
- "path, or put the binary into $PATH.") % tor
+ "path, or put the binary into $PATH." % tor)
sys.exit(0)
else:
raise
@@ -384,7 +384,7 @@ class LocalNodeBuilder(NodeBuilder):
if e.errno == errno.ENOENT:
print("Cannot find tor-gencert binary %r. Use "
"CHUTNEY_TOR_GENCERT environment variable to set the "
- "path, or put the binary into $PATH.") % tor_gencert
+ "path, or put the binary into $PATH." % tor_gencert)
sys.exit(0)
else:
raise
@@ -412,7 +412,7 @@ class LocalNodeBuilder(NodeBuilder):
if e.errno == errno.ENOENT:
print("Cannot find tor binary %r. Use "
"CHUTNEY_TOR environment variable to set the "
- "path, or put the binary into $PATH.") % tor
+ "path, or put the binary into $PATH." % tor)
sys.exit(0)
else:
raise
@@ -579,7 +579,7 @@ class LocalNodeController(NodeController):
if e.errno == errno.ENOENT:
print("Cannot find tor binary %r. Use CHUTNEY_TOR "
"environment variable to set the path, or put the "
- "binary into $PATH.") % tor_path
+ "binary into $PATH." % tor_path)
sys.exit(0)
else:
raise
More information about the tor-commits
mailing list