Skip to content

Commit 60dfff8

Browse files
committed
One more "drop py2"ism from test framework
Signed-off-by: Mats Wichmann <[email protected]>
1 parent 394faec commit 60dfff8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testing/framework/TestCmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,13 @@ def is_List(e):
344344

345345

346346
def to_bytes(s):
347-
if isinstance(s, bytes) or bytes is str:
347+
if isinstance(s, bytes):
348348
return s
349349
return bytes(s, 'utf-8')
350350

351351

352352
def to_str(s):
353-
if bytes is str or is_String(s):
353+
if is_String(s):
354354
return s
355355
return str(s, 'utf-8')
356356

@@ -469,7 +469,7 @@ def match_exact(lines=None, matches=None, newline=os.sep):
469469
:returns: an object (1) on match, else None, like re.match
470470
471471
"""
472-
if isinstance(lines, bytes) or bytes is str:
472+
if isinstance(lines, bytes):
473473
newline = to_bytes(newline)
474474

475475
if not is_List(lines):

0 commit comments

Comments
 (0)