mirror of https://github.com/huashengdun/webssh
Moved some codes into else block
parent
cd3c747747
commit
11bd7fea47
|
@ -435,12 +435,13 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
data = stdout.read()
|
data = stdout.read()
|
||||||
|
except socket.timeout:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
logging.debug('{!r} => {!r}'.format(command, data))
|
logging.debug('{!r} => {!r}'.format(command, data))
|
||||||
result = self.parse_encoding(data)
|
result = self.parse_encoding(data)
|
||||||
if result:
|
if result:
|
||||||
return result
|
return result
|
||||||
except socket.timeout:
|
|
||||||
pass
|
|
||||||
|
|
||||||
logging.warning('Could not detect the default encoding.')
|
logging.warning('Could not detect the default encoding.')
|
||||||
return 'utf-8'
|
return 'utf-8'
|
||||||
|
|
Loading…
Reference in New Issue