Rename protocol muxer initiator flags

This commit is contained in:
Dominik Muhs 2019-10-24 19:25:09 +02:00
parent 021c92ea25
commit 4bda366bb8
2 changed files with 4 additions and 4 deletions

View File

@ -84,14 +84,14 @@ class Multiselect(IMultiselectMuxer):
except MultiselectCommunicatorError as error:
raise MultiselectError(error)
if not validate_handshake(handshake_contents):
if not is_valid_handshake(handshake_contents):
raise MultiselectError(
"multiselect protocol ID mismatch: "
f"received handshake_contents={handshake_contents}"
)
def validate_handshake(handshake_contents: str) -> bool:
def is_valid_handshake(handshake_contents: str) -> bool:
"""
Determine if handshake is valid and should be confirmed
:param handshake_contents: contents of handshake message

View File

@ -33,7 +33,7 @@ class MultiselectClient(IMultiselectClient):
except MultiselectCommunicatorError as error:
raise MultiselectClientError(str(error))
if not validate_handshake(handshake_contents):
if not is_valid_handshake(handshake_contents):
raise MultiselectClientError("multiselect protocol ID mismatch")
async def select_one_of(
@ -86,7 +86,7 @@ class MultiselectClient(IMultiselectClient):
raise MultiselectClientError("unrecognized response: " + response)
def validate_handshake(handshake_contents: str) -> bool:
def is_valid_handshake(handshake_contents: str) -> bool:
"""
Determine if handshake is valid and should be confirmed
:param handshake_contents: contents of handshake message