From 88f0e0b882c6b9ed9f17f0173f9572470701ea81 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 7 Jun 2017 15:16:01 -0400 Subject: [PATCH] removed spurious warning (traling ,) also removed unused improt --- lib/ansible/plugins/inventory/advanced_host_list.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/plugins/inventory/advanced_host_list.py b/lib/ansible/plugins/inventory/advanced_host_list.py index b1a2f437f6..22cc77d67f 100644 --- a/lib/ansible/plugins/inventory/advanced_host_list.py +++ b/lib/ansible/plugins/inventory/advanced_host_list.py @@ -37,7 +37,7 @@ __metaclass__ = type import os from ansible.errors import AnsibleError, AnsibleParserError -from ansible.module_utils._text import to_bytes, to_text, to_native +from ansible.module_utils._text import to_bytes, to_native from ansible.parsing.utils.addresses import parse_address from ansible.plugins.inventory import BaseInventoryPlugin, detect_range, expand_hostname_range @@ -72,8 +72,6 @@ class InventoryModule(BaseInventoryPlugin): for host in hostnames: if host not in self.inventory.hosts: self.inventory.add_host(host, group='ungrouped', port=port) - else: - self.display.warning("Skipping invalid hostname: %s" % to_text(h)) except Exception as e: raise AnsibleParserError("Invalid data from string, could not parse: %s" % str(e))