Skip to content

Commit

Permalink
Avoid an infinite loop in console test
Browse files Browse the repository at this point in the history
  • Loading branch information
tcalmant committed Aug 16, 2017
1 parent 6c0fc06 commit 199d6c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/shell/test_console.py
Expand Up @@ -68,7 +68,12 @@ def test_echo(self):
# Wait for prompt
got = ""
while ps1 not in got:
got += to_str(process.stdout.read(1))
char = to_str(process.stdout.read(1))
if not char:
self.fail("Can't read from stdout ({})"
.format(process.returncode))
else:
got += char

try:
# Try echoing
Expand Down

0 comments on commit 199d6c9

Please sign in to comment.