Unverified Commit e0c975e1 authored by 老广's avatar 老广 Committed by GitHub

Merge pull request #161 from jumpserver/dev

[Update] 修改action
parents 4df98923 fb44c3ac
......@@ -226,7 +226,7 @@ class InteractiveServer:
def _page_generator(self, assets):
start, page = 0, 1
while True:
while not self.client.closed:
_assets = assets[start:start+self.page_size]
# 最后一页
if page == self.total_pages:
......@@ -302,7 +302,7 @@ class InteractiveServer:
opt = net_input(self.client, prompt=':')
if opt in ('p', 'P'):
return PAGE_UP
elif opt in ('b', 'q'):
elif opt in ('b', 'q', None):
return BACK
elif opt and opt.isdigit() and self.results and 0 < int(opt) <= len(self.results):
self.proxy(self.results[int(opt)-1])
......
......@@ -305,7 +305,7 @@ def net_input(client, prompt='Opt> ', sensitive=False, before=0, after=0):
while True:
data = client.recv(1)
if len(data) == 0:
if len(data) == 0 or client.closed:
break
# Client input backspace
if data in char.BACKSPACE_CHAR:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment