From 92c313b8f2c8c0681f6a83a89b87bd9cfc880eaa Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 22 Aug 2015 17:01:20 +0100 Subject: [PATCH] `__pillar__` can be a boolean, don't assume it's a `dict`. Fixes #26559 --- salt/grains/opts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/grains/opts.py b/salt/grains/opts.py index 963cf8326b..8a62c06c7d 100644 --- a/salt/grains/opts.py +++ b/salt/grains/opts.py @@ -9,6 +9,7 @@ def opts(): ''' Return the minion configuration settings ''' - if __opts__.get('grain_opts', False) or __pillar__.get('grain_opts', False): + if __opts__.get('grain_opts', False) or \ + (isinstance(__pillar__, dict) and __pillar__.get('grain_opts', False)): return __opts__ return {}