title: Strange threading error while python garbage collection after script is done
body: <p>I have a python script which uses multiple SSH links to multiple remote servers at the same time. Sometimes when the script is done, I think during garbage collection, I got this exception:</p>
  
  <pre><code>Exception in thread Thread-7 (most likely raised during interpreter shutdown):
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
  &lt;type 'exceptions.AttributeError'&gt;: 'NoneType' object has no attribute 'error'
  Exception in thread Thread-5 (most likely raised during interpreter shutdown):
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
  &lt;type 'exceptions.AttributeError'&gt;: 'NoneType' object has no attribute 'error'
  Exception in thread Thread-4 (most likely raised during interpreter shutdown):
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
  &lt;type 'exceptions.AttributeError'&gt;: 'NoneType' object has no attribute 'error'
  Exception in thread Thread-1 (most likely raised during interpreter shutdown):
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
  &lt;type 'exceptions.AttributeError'&gt;: 'NoneType' object has no attribute 'error'
  </code></pre>
  
  <p>I googled for <code>Exception in thread Thread-7 (most likely raised during interpreter shutdown)</code> and I  find out that sometimes killing threads in multi-threads scripts causes this exception. It's really strange to me, because I have no threading in my scripts. In the other side, it seems to be related to <code>paramiko</code> and I'm pretty sure that I don't use threads for creating SSH links; I just have multiple open shells to multiple servers(maybe more than one shell is connected to one specific server). Any idea about the source of the exception??</p>