From ad034023f30f4d00e9c21bf3e095d3c04b4b7609 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 17 May 2019 10:30:21 -0700 Subject: [PATCH] Be explicit that a code path is just for py2 Change-Id: I7d0345a712f71e76034910fa7bb2bbaf42b4d2ff --- test/functional/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/tests.py b/test/functional/tests.py index 247e74ed82..8cddf12911 100644 --- a/test/functional/tests.py +++ b/test/functional/tests.py @@ -1946,7 +1946,8 @@ class TestFile(Base): if len(key) > j: key = key[:j] - if isinstance(val, bytes): + # NB: we'll likely write object metadata that's *not* UTF-8 + if six.PY2: val = val[:j] else: val = val.encode('utf8')[:j].decode(