ui: don't show unpaired host choices

This commit is contained in:
Peter F. Patel-Schneider 2020-09-20 19:40:34 -04:00
parent ff5d744183
commit b1706fa9e2
1 changed files with 3 additions and 2 deletions

View File

@ -476,8 +476,9 @@ def _feature_change_host_callback(device):
hostNames[currentHost] = (True, socket.gethostname().partition('.')[0])
choices = _NamedInts()
for host in range(0, numHosts):
_ignore, hostName = hostNames.get(host, (False, ''))
choices[host] = str(host + 1) + ':' + hostName if hostName else str(host + 1)
paired, hostName = hostNames.get(host, (True, ''))
if paired:
choices[host] = str(host + 1) + ':' + hostName if hostName else str(host + 1)
return _ChoicesV(choices, read_skip_byte_count=1) if choices else None