mirror of https://github.com/huashengdun/webssh
Set utf-8 as the default encoding if we cannot detect it
parent
795875807b
commit
5f4978a994
|
@ -427,7 +427,11 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
|
||||||
]
|
]
|
||||||
|
|
||||||
for command in commands:
|
for command in commands:
|
||||||
|
try:
|
||||||
_, stdout, _ = ssh.exec_command(command, get_pty=True)
|
_, stdout, _ = ssh.exec_command(command, get_pty=True)
|
||||||
|
except paramiko.SSHException as exc:
|
||||||
|
logging.info(str(exc))
|
||||||
|
else:
|
||||||
data = stdout.read()
|
data = stdout.read()
|
||||||
logging.debug('{!r} => {!r}'.format(command, data))
|
logging.debug('{!r} => {!r}'.format(command, data))
|
||||||
result = self.parse_encoding(data)
|
result = self.parse_encoding(data)
|
||||||
|
|
Loading…
Reference in New Issue