我正在使用结构python库使用我创建50倍ssh连接我需要它但我得到以下错误

时间:2017-11-15 06:16:20

标签: python

在python中使用结构库并形成ssh连接时出现以下错误

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 1923, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'

  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 1923, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'

1 个答案:

答案 0 :(得分:0)

通过使用fabric python库中的连接来解决问题。默认情况下,在缓存中存储所有ip,然后在脚本结束时使用disconnect_all()方法从所有远程机器断开连接。