[tor-commits] [trunnel/main] Fix a pair of python2-style print invocations.

nickm at torproject.org nickm at torproject.org
Thu Nov 4 15:32:44 UTC 2021


commit a989078a8927aa80ee76afe65efc46f2fde59b60
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Nov 4 11:32:40 2021 -0400

    Fix a pair of python2-style print invocations.
---
 lib/trunnel/SeedFuzzer.py | 2 +-
 lib/trunnel/__main__.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/trunnel/SeedFuzzer.py b/lib/trunnel/SeedFuzzer.py
index 9726c3a..38403cb 100644
--- a/lib/trunnel/SeedFuzzer.py
+++ b/lib/trunnel/SeedFuzzer.py
@@ -374,7 +374,7 @@ class CorpusGenerator(trunnel.CodeGen.ASTVisitor):
                 continue
             digest = hashlib.sha256(item).hexdigest()
             fname = os.path.join(target, digest)
-            print fname
+            print(fname)
             with open(fname, 'wb') as f:
                 f.write(item)
             examples.add(item)
diff --git a/lib/trunnel/__main__.py b/lib/trunnel/__main__.py
index dc4a66c..f232544 100644
--- a/lib/trunnel/__main__.py
+++ b/lib/trunnel/__main__.py
@@ -36,7 +36,7 @@ if __name__ == '__main__':
                 sys.stderr.write("I'm %s; you asked for %s\n" % (me, it))
                 sys.exit(1)
         except ImportError:
-            print "Can't import"
+            print("Can't import LooseVersion tool.")
 
     if len(args) < 1 and not write_c_files and not need_version:
         sys.stderr.write("Syntax: python -m trunnel <fname>\n")



More information about the tor-commits mailing list