From e282309f6d1e02e0b043db736fa9135f811b4208 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Fri, 21 Aug 2015 16:08:21 -0400 Subject: [PATCH] Make sure the inventory restriction is not None --- lib/ansible/inventory/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index d25409b0ae..5c44b010d6 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -523,7 +523,9 @@ class Inventory(object): to batch serial operations in main playbook code, don't use this for other reasons. """ - if not isinstance(restriction, list): + if restriction is None: + return + elif not isinstance(restriction, list): restriction = [ restriction ] self._restriction = restriction