title: PySFTP/Paramiko exceptions leaking into stderr
body: <p>I am trying to catch <code>paramiko</code> exceptions but they are still written to stderr. </p>
  
  <p>Is there a way to stop writing there?</p>
  
  <p>EDIT: It happens even before paramiko gets involved:</p>
  
  <pre><code>import pysftp
  
  try:
      pysftp.Connection(host="localhost")
  except Exception as e:
      print(e)
  </code></pre>
  
  <p>Results in:</p>
  
  <p><a href="https://i.stack.imgur.com/phH4C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/phH4C.png" alt="enter image description here"></a></p>
  
  <p>Example with proper SFTP params:</p>
  
  <p><a href="https://i.stack.imgur.com/obhwq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/obhwq.png" alt="enter image description here"></a></p>
  
  <p>UPDATE:</p>
  
  <pre><code>$ pipenv graph
  ...
  pysftp==0.2.9
    - paramiko [required: &gt;=1.17, installed: 2.6.0]
  ...
  
  $ pipenv run python
  Python 3.7.3 (default, Jul 19 2019, 11:21:39)
  [Clang 11.0.0 (clang-1100.0.28.3)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import pysftp
  &gt;&gt;&gt; try:
  ...     pysftp.Connection(host="localhost")
  ... except Exception as e:
  ...     print(e)
  ...
  No hostkey for host localhost found.
  Exception ignored in: &lt;function Connection.__del__ at 0x10f7e8268&gt;
  Traceback (most recent call last):
    File "/Users/andrei/Work/try/.venv/lib/python3.7/site-packages/pysftp/__init__.py", line 1013, in __del__
      self.close()
    File "/Users/andrei/Work/try/.venv/lib/python3.7/site-packages/pysftp/__init__.py", line 784, in close
      if self._sftp_live:
  AttributeError: 'Connection' object has no attribute '_sftp_live'
  &gt;&gt;&gt;
  </code></pre>