[tor-commits] [torspec/master] reindex.py: drop python2 support.

nickm at torproject.org nickm at torproject.org
Mon Jul 27 14:52:01 UTC 2020


commit ea85e63de494d5ad18b587ded43f6fa437d4873c
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Jul 27 10:18:21 2020 -0400

    reindex.py: drop python2 support.
---
 proposals/reindex.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/proposals/reindex.py b/proposals/reindex.py
index 361ea16..07dd17a 100755
--- a/proposals/reindex.py
+++ b/proposals/reindex.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 
-# Future imports for Python 2.7, mandatory in 3.0
-from __future__ import division
-from __future__ import print_function
-from __future__ import unicode_literals
+import sys
+if sys.version_info[0] < 3:
+    print("No support for Python 2.")
+    sys.exit(1)
 
 import codecs, re, os
 class Error(Exception): pass





More information about the tor-commits mailing list