From 60dfff82a334b07f3f409fe78cbb8771ebf738f1 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 13 Oct 2020 07:56:28 -0600 Subject: One more "drop py2"ism from test framework Signed-off-by: Mats Wichmann --- testing/framework/TestCmd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py index 558bf44..76609a0 100644 --- a/testing/framework/TestCmd.py +++ b/testing/framework/TestCmd.py @@ -344,13 +344,13 @@ def is_List(e): def to_bytes(s): - if isinstance(s, bytes) or bytes is str: + if isinstance(s, bytes): return s return bytes(s, 'utf-8') def to_str(s): - if bytes is str or is_String(s): + if is_String(s): return s return str(s, 'utf-8') @@ -469,7 +469,7 @@ def match_exact(lines=None, matches=None, newline=os.sep): :returns: an object (1) on match, else None, like re.match """ - if isinstance(lines, bytes) or bytes is str: + if isinstance(lines, bytes): newline = to_bytes(newline) if not is_List(lines): -- cgit v0.12