From: Nils Gillmann Date: Thu, 14 Jun 2018 18:51:13 +0000 (+0000) Subject: really fix #5243 -- it is fun to fix python2+3 for testsuite which will become irrele... X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dd926a1daf954cc8e67475f8916f69a9ccb4923c;p=oweals%2Fgnunet.git 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 --- 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).