mirror of https://github.com/jumpserver/jumpserver
修复vim修改窗口大小中断bug
parent
81a6f4841f
commit
b6f82ca020
|
@ -415,7 +415,10 @@ class SshTty(Tty):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if sys.stdin in r:
|
if sys.stdin in r:
|
||||||
x = os.read(sys.stdin.fileno(), 4096)
|
try:
|
||||||
|
x = os.read(sys.stdin.fileno(), 4096)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
input_mode = True
|
input_mode = True
|
||||||
if str(x) in ['\r', '\n', '\r\n']:
|
if str(x) in ['\r', '\n', '\r\n']:
|
||||||
if self.vim_flag:
|
if self.vim_flag:
|
||||||
|
@ -803,7 +806,7 @@ def main():
|
||||||
color_print('请输入正确ID', 'red')
|
color_print('请输入正确ID', 'red')
|
||||||
except ServerError, e:
|
except ServerError, e:
|
||||||
color_print(e, 'red')
|
color_print(e, 'red')
|
||||||
except Exception, e:
|
except IndexError, e:
|
||||||
color_print(e)
|
color_print(e)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue