Skip to content

Commit

Permalink
[console] Display success message after line cleared (sonic-net#1579)
Browse files Browse the repository at this point in the history
* [console] Display success message after line cleared

Signed-off-by: Jing Kan jika@microsoft.com
  • Loading branch information
Blueve committed Apr 25, 2021
1 parent b10c157 commit a3d37f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions consutil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def clear(db, target, devicename):

if not target_port.clear_session():
click.echo("No process is connected to line " + target_port.line_num)
else:
click.echo("Cleared line")

# 'connect' subcommand
@consutil.command()
Expand Down
2 changes: 1 addition & 1 deletion tests/console_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,4 +698,4 @@ def test_clear_success(self):
print(result.exit_code)
print(sys.stderr, result.output)
assert result.exit_code == 0
assert result.output == ""
assert "Cleared line" in result.output

0 comments on commit a3d37f1

Please sign in to comment.