Suppressing paramiko log

Posted by 4Aiur on 12/26/2011 in Python |

Suppressing paramiko log

Backup paramiko source file.

cd /usr/local/lib/python2.7/site-packages/
cp -p paramiko/util.py{,.bak}

Modify paramiko/util.py.

diff paramiko/util.py{,.bak}

265c265
         return True

Set logger name "suppress" in your code.

self.client = SSHClient()
self.client.set_log_channel('suppress')

Tags: , ,

Copyright © 2010-2024 4Aiur All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.