Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
bbcf1a0b
Commit
bbcf1a0b
authored
Nov 12, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix confusing return statements, closes #67.
parent
3831ac36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
mitogen/ssh.py
mitogen/ssh.py
+2
-1
mitogen/sudo.py
mitogen/sudo.py
+2
-1
No files found.
mitogen/ssh.py
View file @
bbcf1a0b
...
@@ -80,7 +80,8 @@ class Stream(mitogen.master.Stream):
...
@@ -80,7 +80,8 @@ class Stream(mitogen.master.Stream):
time
.
time
()
+
10.0
):
time
.
time
()
+
10.0
):
LOG
.
debug
(
'%r: received %r'
,
self
,
buf
)
LOG
.
debug
(
'%r: received %r'
,
self
,
buf
)
if
buf
.
endswith
(
'EC0
\
n
'
):
if
buf
.
endswith
(
'EC0
\
n
'
):
return
self
.
_ec0_received
()
self
.
_ec0_received
()
return
elif
PERMDENIED_PROMPT
in
buf
.
lower
():
elif
PERMDENIED_PROMPT
in
buf
.
lower
():
if
self
.
password
is
not
None
and
password_sent
:
if
self
.
password
is
not
None
and
password_sent
:
raise
PasswordError
(
self
.
password_incorrect_msg
)
raise
PasswordError
(
self
.
password_incorrect_msg
)
...
...
mitogen/sudo.py
View file @
bbcf1a0b
...
@@ -71,7 +71,8 @@ class Stream(mitogen.master.Stream):
...
@@ -71,7 +71,8 @@ class Stream(mitogen.master.Stream):
time
.
time
()
+
10.0
):
time
.
time
()
+
10.0
):
LOG
.
debug
(
'%r: received %r'
,
self
,
buf
)
LOG
.
debug
(
'%r: received %r'
,
self
,
buf
)
if
buf
.
endswith
(
'EC0
\
n
'
):
if
buf
.
endswith
(
'EC0
\
n
'
):
return
self
.
_ec0_received
()
self
.
_ec0_received
()
return
elif
PASSWORD_PROMPT
in
buf
.
lower
():
elif
PASSWORD_PROMPT
in
buf
.
lower
():
if
self
.
password
is
None
:
if
self
.
password
is
None
:
raise
PasswordError
(
self
.
password_required_msg
)
raise
PasswordError
(
self
.
password_required_msg
)
...
...
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