Add test for future in gnunet-qr.py. pylint will probably scream, but this should...
authorng0 <ng0@n0.is>
Tue, 26 Feb 2019 10:48:32 +0000 (10:48 +0000)
committerng0 <ng0@n0.is>
Tue, 26 Feb 2019 10:48:32 +0000 (10:48 +0000)
src/util/gnunet-qr.py

index bf35b3a7e4bde7b2a70788c7531567c8c20e4b10..c0518854dc8a6c81d7baad792a9fe6439d662aab 100755 (executable)
@@ -1,6 +1,10 @@
-from __future__ import print_function
-from builtins import str
 import sys
+try:
+    from __future__ import print_function
+    from builtins import str
+except ImportError as e:
+    print('Cannot import future modules, python2.7 future module required!')
+    sys.exit(1) 
 import getopt
 import subprocess
 from sys import argv