diff options
Diffstat (limited to 'src/fs')
-rwxr-xr-x | src/fs/test_gnunet_fs_psd.py.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fs/test_gnunet_fs_psd.py.in b/src/fs/test_gnunet_fs_psd.py.in index 4c91c6327..906282200 100755 --- a/src/fs/test_gnunet_fs_psd.py.in +++ b/src/fs/test_gnunet_fs_psd.py.in @@ -32,10 +32,13 @@ except NameError: # Python 3.0 - 3.3 from imp import reload -# Force encoding to utf-8, as this test otherwise fails -# on some systems (see #5094). reload(sys) -sys.setdefaultencoding('utf8') + +# Force encoding to utf-8, as this test otherwise fails +# on some systems (see #5094). In Python 3+ there is no attribute +# sys.setdefaultencoding anymore. +if (3 < sys.version_info[0]): + sys.setdefaultencoding('utf8') srcdir = "../.." gnunet_pyexpect_dir = os.path.join(srcdir, "contrib/scripts") |