summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorxrs <xrs@mail36.net>2018-06-23 16:58:37 +0200
committerxrs <xrs@mail36.net>2018-06-23 16:58:37 +0200
commitb993ca621717d0a9958b4138a32fb1e3cef7f54c (patch)
tree187864cebbef748f76add95af543a715db0069b2 /src/fs
parent4c7eae3c88bed613fb365920812dc60e0e364ee4 (diff)
fix fs/test_gnunet_fs_psd.py.in for python3
Diffstat (limited to 'src/fs')
-rwxr-xr-xsrc/fs/test_gnunet_fs_psd.py.in9
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")