From 9890b35ae248306af073b0066c49b0a9572bdc24 Mon Sep 17 00:00:00 2001 From: James Brown Date: Mon, 27 Apr 2015 12:15:04 -0700 Subject: [PATCH] allow using "exists" with direct attributes --- clusto_query/query/operator/affix.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clusto_query/query/operator/affix.py b/clusto_query/query/operator/affix.py index 7042dbf..67f0203 100644 --- a/clusto_query/query/operator/affix.py +++ b/clusto_query/query/operator/affix.py @@ -49,8 +49,11 @@ class ExistsOperator(SuffixOperator): operator = ('exists',) def _exists(self, host, context): - prop = _extract_property(host, self.lhs, context) - return bool(prop) + try: + prop = _extract_property(host, self.lhs, context) + return bool(prop) + except AttributeError: + return False def run(self, candidate_hosts, context): hosts = set()