diff options
Diffstat (limited to 'src')
-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: | |||
32 | # Python 3.0 - 3.3 | 32 | # Python 3.0 - 3.3 |
33 | from imp import reload | 33 | from imp import reload |
34 | 34 | ||
35 | # Force encoding to utf-8, as this test otherwise fails | ||
36 | # on some systems (see #5094). | ||
37 | reload(sys) | 35 | reload(sys) |
38 | sys.setdefaultencoding('utf8') | 36 | |
37 | # Force encoding to utf-8, as this test otherwise fails | ||
38 | # on some systems (see #5094). In Python 3+ there is no attribute | ||
39 | # sys.setdefaultencoding anymore. | ||
40 | if (3 < sys.version_info[0]): | ||
41 | sys.setdefaultencoding('utf8') | ||
39 | 42 | ||
40 | srcdir = "../.." | 43 | srcdir = "../.." |
41 | gnunet_pyexpect_dir = os.path.join(srcdir, "contrib/scripts") | 44 | gnunet_pyexpect_dir = os.path.join(srcdir, "contrib/scripts") |