diff options
author | xrs <xrs@mail36.net> | 2018-06-23 16:58:37 +0200 |
---|---|---|
committer | xrs <xrs@mail36.net> | 2018-06-23 16:58:37 +0200 |
commit | b993ca621717d0a9958b4138a32fb1e3cef7f54c (patch) | |
tree | 187864cebbef748f76add95af543a715db0069b2 /src/fs | |
parent | 4c7eae3c88bed613fb365920812dc60e0e364ee4 (diff) | |
download | gnunet-b993ca621717d0a9958b4138a32fb1e3cef7f54c.tar.gz gnunet-b993ca621717d0a9958b4138a32fb1e3cef7f54c.zip |
fix fs/test_gnunet_fs_psd.py.in for python3
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: | |||
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") |