mirror of
https://github.com/huashengdun/webssh.git
synced 2026-08-20 04:36:42 +00:00
Moved some codes into else block
This commit is contained in:
+3
-2
@@ -435,12 +435,13 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
|
||||
else:
|
||||
try:
|
||||
data = stdout.read()
|
||||
except socket.timeout:
|
||||
pass
|
||||
else:
|
||||
logging.debug('{!r} => {!r}'.format(command, data))
|
||||
result = self.parse_encoding(data)
|
||||
if result:
|
||||
return result
|
||||
except socket.timeout:
|
||||
pass
|
||||
|
||||
logging.warning('Could not detect the default encoding.')
|
||||
return 'utf-8'
|
||||
|
||||
Reference in New Issue
Block a user