ssh: show full trace to easy diagnostics

This commit is contained in:
Oleksii Shevchuk 2018-10-16 08:54:02 +03:00
parent fcd153714e
commit d8a0fcf8c2
1 changed files with 9 additions and 2 deletions

View File

@ -31,6 +31,8 @@ from urllib import unquote
from sys import getfilesystemencoding from sys import getfilesystemencoding
from traceback import format_exc
try: try:
from puttykeys import ppkraw_to_openssh from puttykeys import ppkraw_to_openssh
except ImportError: except ImportError:
@ -415,7 +417,11 @@ class SSH(object):
yield pair yield pair
for process in process_iter(): for process in process_iter():
try:
info = process.as_dict() info = process.as_dict()
except OSError:
continue
if 'environ' not in info or info['environ'] is None: if 'environ' not in info or info['environ'] is None:
continue continue
@ -1140,7 +1146,8 @@ def _ssh_cmd(ssh_cmd, thread_name, arg, hosts, port, user, passwords, private_ke
continue continue
except Exception as e: except Exception as e:
data_cb((3, 'Exception: {}: {}'.format(type(e), str(e)))) data_cb((3, 'Exception: {}: {}\n{}'.format(
type(e), str(e), format_exc(limit=20))))
continue continue
conninfo = [4] conninfo = [4]