Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
e0c975e1
Unverified
Commit
e0c975e1
authored
Dec 26, 2018
by
老广
Committed by
GitHub
Dec 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #161 from jumpserver/dev
[Update] 修改action
parents
4df98923
fb44c3ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
interactive.py
coco/interactive.py
+2
-2
utils.py
coco/utils.py
+1
-1
No files found.
coco/interactive.py
View file @
e0c975e1
...
...
@@ -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
])
...
...
coco/utils.py
View file @
e0c975e1
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment