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
This commit is contained in:
James Slagle 2018-09-14 17:03:52 -04:00
parent 6b0f54c07a
commit 0b14fd10fd
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

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