raise exception on conditions resulting in empty inventory

pull/2475/head
damon 2020-12-12 17:52:14 -08:00
parent 02eb38d5a8
commit 92ea9846f0
1 changed files with 2 additions and 0 deletions

View File

@ -296,6 +296,8 @@ class BaseCloudNodeConfigurator:
# filter out the nodes we will not be dealing with
nodes = {key: value for key, value in self.config['instances'].items() if key in node_names}
if not nodes:
raise KeyError(f"No hosts matched the supplied names: {node_names}. Try `nucypher cloudworkers list-hosts`")
default_envvars = [
('NUCYPHER_KEYRING_PASSWORD', self.config['keyringpassword']),