Don't throw valueerror on bootstrap

When keystone-manage bootstrap is ran without providing a value
to set as the admin password, keystone-manage will throw an
unhandled ValueError while displaying the proper warning
message.

This change removes the ValueError and simply has the CLI
exit out when this condition is met.

Closes-Bug: #1804700

Change-Id: I4e7d5eeb2e48ff354b44196bd11d62d51a73357b
This commit is contained in:
Gage Hugo 2019-05-20 15:19:39 -05:00
parent 9b81cebbaf
commit 295b07cc76
1 changed files with 2 additions and 2 deletions

View File

@ -152,9 +152,9 @@ class BootStrap(BaseApp):
self.endpoints = None
if self.password is None:
print(_('Either --bootstrap-password argument or '
print(_('ERROR: Either --bootstrap-password argument or '
'OS_BOOTSTRAP_PASSWORD must be set.'))
raise ValueError
sys.exit(1)
self.bootstrapper.admin_password = self.password
self.bootstrapper.admin_username = self.username