really fix #5243 -- it is fun to fix python2+3 for testsuite which will become irrele...
authorNils Gillmann <ng0@n0.is>
Thu, 14 Jun 2018 18:51:13 +0000 (18:51 +0000)
committerNils Gillmann <ng0@n0.is>
Thu, 14 Jun 2018 18:51:13 +0000 (18:51 +0000)
Signed-off-by: Nils Gillmann <ng0@n0.is>
src/fs/test_gnunet_fs_psd.py.in

index 0e191d4a4b2f870e7362e5121624147f63c923bb..4c91c632746ded8d26ab712a63adf705a43a0517 100755 (executable)
@@ -22,11 +22,15 @@ import subprocess
 import re
 import shutil
 try:
+    # Python 2.7
     reload
 except NameError:
-    # python3.4:
-    from importlib import reload
-
+    try:
+        # Python 3.4+:
+        from importlib import reload
+    except ImportError:
+        # Python 3.0 - 3.3
+        from imp import reload
 
 # Force encoding to utf-8, as this test otherwise fails
 # on some systems (see #5094).