Skip to content

Unnecessary python2->3 code can likely be removed #1558

@alexrudd2

Description

@alexrudd2

Since Python2 has been dropped, I think this code can be dropped and its callers changed to use encode() directly.

def make_byte_string(byte_string):
"""Return byte string from a given string, python3 specific fix.
:param byte_string:
:return:
"""
if isinstance(byte_string, str):
byte_string = byte_string.encode()
return byte_string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions