def unload_handler(): # Kill all connections SftpThread.cleanup() # Reset the exception handler if sys.excepthook.__name__ == 'uncaught_except': sys.excepthook = sys.__excepthook__
def unload_handler(): try: SftpThread.cleanup() except (NameError): pass ExcepthookChain.remove('sftp_uncaught_except')
def plugin_unloaded(): try: SftpThread.cleanup() except (NameError): pass cmd_cleanup() ExcepthookChain.remove('sftp_uncaught_except')
def unload_handler(): SftpThread.cleanup() ExcepthookChain.remove('sftp_uncaught_except')