From ae9b34b1d9767387aaca53a4039529c536bf9e23 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Fri, 25 Sep 2015 14:53:43 -0400 Subject: [PATCH] Fix for equality checking in Host to make sure things are like types --- lib/ansible/inventory/host.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/inventory/host.py b/lib/ansible/inventory/host.py index f6089f07ed..a561b951b4 100644 --- a/lib/ansible/inventory/host.py +++ b/lib/ansible/inventory/host.py @@ -36,6 +36,8 @@ class Host: return self.deserialize(data) def __eq__(self, other): + if not isinstance(other, Host): + return False return self.name == other.name def __ne__(self, other):