Merge "Fix error during host remove all"

This commit is contained in:
Zuul 2018-05-24 21:48:57 +00:00 committed by Gerrit Code Review
commit ecc2c68134
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ class HostRemove(Command):
hostnames = [hostname]
if hostname == 'all':
hostnames = _get_all_hostnames()
CLIENT.host_remove(hostnames)
if len(hostnames) > 0:
CLIENT.host_remove(hostnames)
except ClientException as e:
raise CommandError(str(e))