Fixed some broken things from communicator decoupling

This commit is contained in:
Kevin Froman 2020-08-08 12:38:14 -05:00
parent bff2595ac9
commit 96af4e8db0
9 changed files with 14 additions and 13 deletions

View file

@ -26,9 +26,8 @@ if TYPE_CHECKING:
"""
def pick_online_peer(comm_inst):
def pick_online_peer(kv: 'DeadSimpleKV'):
"""Randomly picks peer from pool without bias (using secrets module)."""
kv: "DeadSimpleKV" = comm_inst.shared_state.get_by_string("DeadSimpleKV")
ret_data = ''
peer_length = len(kv.get('onlinePeers'))
if peer_length <= 0: