I'm not sure this was neccessary, ``urlparse.split`` is guaranteed to return a ``SplitResult`` of strings the same type it was given, which in this case means ``port`` is guaranteed to be bytes.