From fad93f4144bb2da4d629f6c36d5668628e989db9 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 8 Sep 2020 14:13:22 -0400 Subject: [PATCH] Use existing utility. --- src/allmydata/test/test_storage.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index 797d02794..4bbbcda30 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -8,7 +8,7 @@ from __future__ import division from __future__ import print_function from __future__ import unicode_literals -from future.utils import native_str, PY2, PY3, bytes_to_native_str +from future.utils import native_str, PY2, bytes_to_native_str if PY2: from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401 @@ -1373,8 +1373,7 @@ class MutableServer(unittest.TestCase): si = base32.b2a(b"si1") # note: this is a detail of the storage server implementation, and # may change in the future - if PY3: - si = si.decode("utf-8") + si = bytes_to_native_str(si) # filesystem paths are native strings prefix = si[:2] prefixdir = os.path.join(self.workdir("test_remove"), "shares", prefix) bucketdir = os.path.join(prefixdir, si)