问题描述
我正在尝试运行此 example from the Fabric documentation,但结果略有不同。为什么?
这是代码片段
>>> from fabric import Connection
>>> for host in ('host1','host2','host3','host4'):
>>> result = Connection(host).run('uname -s')
...
print("{}: {}".format(host,result.stdout.strip()))
输出:
Linux
user@10.0.0.46: Linux
Linux
user@10.0.0.217: Linux
Linux
user@10.0.0.100: Linux
Linux
user@10.0.0.223: Linux
结果被打印两次。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)