diff options
| author | Zuul <zuul@review.openstack.org> | 2018-03-23 16:29:23 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2018-03-23 16:29:23 +0000 |
| commit | 3f99dbac342b52ccecc78c32f54047b18726e320 (patch) | |
| tree | 132898aaeaebed712ba79fc1ec4bce186d0e2988 /openstackclient | |
| parent | 255fe686f14d690cc5de024d9b96a95563e746f7 (diff) | |
| parent | 9a173568548203757a7fd20883edd56f923cc7e8 (diff) | |
| download | python-openstackclient-3f99dbac342b52ccecc78c32f54047b18726e320.tar.gz | |
Merge "Fix crashing "console log show""
Diffstat (limited to 'openstackclient')
| -rw-r--r-- | openstackclient/compute/v2/console.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openstackclient/compute/v2/console.py b/openstackclient/compute/v2/console.py index 25f92108..b2f7288f 100644 --- a/openstackclient/compute/v2/console.py +++ b/openstackclient/compute/v2/console.py @@ -15,8 +15,6 @@ """Compute v2 Console action implementations""" -import sys - from osc_lib.cli import parseractions from osc_lib.command import command from osc_lib import utils @@ -60,7 +58,10 @@ class ShowConsoleLog(command.Command): length += 1 data = server.get_console_output(length=length) - sys.stdout.write(data) + + if data and data[-1] != '\n': + data += '\n' + self.app.stdout.write(data) class ShowConsoleURL(command.ShowOne): |
