Handle non-existant plan when getting deployment status

Instead of showing a traceback when requesting the deployment status of
a non-existant plan, show a useful message instead.

Change-Id: I3b10361fd17e1068e46a219b8081451f5c7ed035
Depends-On: Ic0333c0726b16d284a7cc54bc68e16ea1c9ebc4d
Closes-Bug: #1792637
(cherry picked from commit 0b14fd10fd)
(cherry picked from commit 559365aaae)
This commit is contained in:
James Slagle 2018-09-14 17:03:52 -04:00 committed by Emilien Macchi
parent 092449a9c6
commit f650c81ac8
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
fixes:
- When requesting the deployment status of a non-existant plan, instead of
showing a traceback, show a helpful message indicating there is no status.

View File

@ -1079,6 +1079,9 @@ class GetDeploymentStatus(command.Command):
plan=plan
)
if not status:
return
payload = status['workflow_status']['payload']
execution = payload['execution']
table = PrettyTable(