Skip to content

Commit

Permalink
修复拼写错误,修复 -t 选择主机时的代码错误,使切片列表支持逗号分割项
Browse files Browse the repository at this point in the history
  • Loading branch information
souloss committed Nov 10, 2021
1 parent 0a40d50 commit e2778bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def get_target(hosts: Dict[str, Host], name):
result.append(hosts[name])
# host name
elif name in [ host.hostname for key, host in hosts.items() ]:
result.extend(list(filter(lambda i:i.hostname==name, hosts)))
result.extend(list(filter(lambda i: i.hostname==name, hosts.values())))
# slice
elif re.findall(SLICE_NON_GROUP_PATTERN, name):
hostnames = expand_hostname_slice(name)
Expand Down

0 comments on commit e2778bf

Please sign in to comment.