Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
c5779dee
Commit
c5779dee
authored
10 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Pass code check
parent
79c944ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mininet/cli.py
+4
-1
4 additions, 1 deletion
mininet/cli.py
mininet/term.py
+2
-1
2 additions, 1 deletion
mininet/term.py
with
6 additions
and
2 deletions
mininet/cli.py
+
4
−
1
View file @
c5779dee
...
@@ -68,6 +68,7 @@ def __init__( self, mininet, stdin=sys.stdin, script=None ):
...
@@ -68,6 +68,7 @@ def __init__( self, mininet, stdin=sys.stdin, script=None ):
self
.
run
()
self
.
run
()
readlineInited
=
False
readlineInited
=
False
@classmethod
@classmethod
def
initReadline
(
cls
):
def
initReadline
(
cls
):
"
Set up history if readline is available
"
"
Set up history if readline is available
"
...
@@ -101,10 +102,12 @@ def run( self ):
...
@@ -101,10 +102,12 @@ def run( self ):
break
break
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
# Output a message - unless it's also interrupted
# Output a message - unless it's also interrupted
# pylint: disable=broad-except
try
:
try
:
output
(
'
\n
Interrupt
\n
'
)
output
(
'
\n
Interrupt
\n
'
)
except
:
except
Exception
:
pass
pass
# pylint: enable=broad-except
def
emptyline
(
self
):
def
emptyline
(
self
):
"
Don
'
t repeat last command when you hit return.
"
"
Don
'
t repeat last command when you hit return.
"
...
...
This diff is collapsed.
Click to expand it.
mininet/term.py
+
2
−
1
View file @
c5779dee
...
@@ -54,7 +54,8 @@ def makeTerm( node, title='Node', term='xterm', display=None, cmd='bash'):
...
@@ -54,7 +54,8 @@ def makeTerm( node, title='Node', term='xterm', display=None, cmd='bash'):
display
,
tunnel
=
tunnelX11
(
node
,
display
)
display
,
tunnel
=
tunnelX11
(
node
,
display
)
if
display
is
None
:
if
display
is
None
:
return
[]
return
[]
term
=
node
.
popen
(
cmds
[
term
]
+
[
display
,
'
-e
'
,
'
env TERM=ansi %s
'
%
cmd
]
)
term
=
node
.
popen
(
cmds
[
term
]
+
[
display
,
'
-e
'
,
'
env TERM=ansi %s
'
%
cmd
]
)
return
[
tunnel
,
term
]
if
tunnel
else
[
term
]
return
[
tunnel
,
term
]
if
tunnel
else
[
term
]
def
runX11
(
node
,
cmd
):
def
runX11
(
node
,
cmd
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment