No hosts matched goes to stderr.

pull/8311/head
Michael DeHaan 10 years ago
parent d1d318b028
commit 6caad9ac8f

@ -94,7 +94,7 @@ class Cli(object):
inventory_manager.subset(options.subset) inventory_manager.subset(options.subset)
hosts = inventory_manager.list_hosts(pattern) hosts = inventory_manager.list_hosts(pattern)
if len(hosts) == 0: if len(hosts) == 0:
callbacks.display("No hosts matched") callbacks.display("No hosts matched", stderr=True)
sys.exit(0) sys.exit(0)
if options.listhosts: if options.listhosts:
@ -132,7 +132,7 @@ class Cli(object):
inventory_manager.subset(options.subset) inventory_manager.subset(options.subset)
hosts = inventory_manager.list_hosts(pattern) hosts = inventory_manager.list_hosts(pattern)
if len(hosts) == 0: if len(hosts) == 0:
callbacks.display("No hosts matched") callbacks.display("No hosts matched", stderr=True)
sys.exit(0) sys.exit(0)
if options.listhosts: if options.listhosts:

Loading…
Cancel
Save