From dd926a1daf954cc8e67475f8916f69a9ccb4923c Mon Sep 17 00:00:00 2001 From: Nils Gillmann Date: Thu, 14 Jun 2018 18:51:13 +0000 Subject: really fix #5243 -- it is fun to fix python2+3 for testsuite which will become irrelevant when in the future we only support 2.7 legacy and some range of 3.x Signed-off-by: Nils Gillmann --- src/fs/test_gnunet_fs_psd.py.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/fs') diff --git a/src/fs/test_gnunet_fs_psd.py.in b/src/fs/test_gnunet_fs_psd.py.in index 0e191d4a4..4c91c6327 100755 --- a/src/fs/test_gnunet_fs_psd.py.in +++ b/src/fs/test_gnunet_fs_psd.py.in @@ -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). -- cgit v1.2.3