mark explicit modulo formatting (to get started with PR draft)

This commit is contained in:
Jonathan de Jong 2019-12-19 00:36:50 +01:00
parent 445c0f8e65
commit 6cf1b98a88
2 changed files with 5 additions and 5 deletions

View File

@ -114,7 +114,7 @@ class Swarm(INetwork):
error_msg = "fail to upgrade security for peer %s"
logger.debug(error_msg, peer_id)
await raw_conn.close()
raise SwarmException(error_msg % peer_id) from error
raise SwarmException(error_msg % peer_id) from error # wip
logger.debug("upgraded security for peer %s", peer_id)
@ -124,7 +124,7 @@ class Swarm(INetwork):
error_msg = "fail to upgrade mux for peer %s"
logger.debug(error_msg, peer_id)
await secured_conn.close()
raise SwarmException(error_msg % peer_id) from error
raise SwarmException(error_msg % peer_id) from error # wip
logger.debug("upgraded mux for peer %s", peer_id)
@ -190,7 +190,7 @@ class Swarm(INetwork):
error_msg = "fail to upgrade security for peer at %s"
logger.debug(error_msg, peer_addr)
await raw_conn.close()
raise SwarmException(error_msg % peer_addr) from error
raise SwarmException(error_msg % peer_addr) from error # wip
peer_id = secured_conn.get_remote_peer()
logger.debug("upgraded security for peer at %s", peer_addr)
@ -204,7 +204,7 @@ class Swarm(INetwork):
error_msg = "fail to upgrade mux for peer %s"
logger.debug(error_msg, peer_id)
await secured_conn.close()
raise SwarmException(error_msg % peer_id) from error
raise SwarmException(error_msg % peer_id) from error # wip
logger.debug("upgraded mux for peer %s", peer_id)
await self.add_conn(muxed_conn)

View File

@ -92,4 +92,4 @@ class TCP(ITransport):
def _multiaddr_from_socket(socket: socket) -> Multiaddr:
return Multiaddr("/ip4/%s/tcp/%s" % socket.getsockname())
return Multiaddr("/ip4/%s/tcp/%s" % socket.getsockname()) # wip