Skip to content

Commit

Permalink
Merge pull request #25264 from ruzarowski/2015.8-Fileserver-update_opts
Browse files Browse the repository at this point in the history
Fix AttributeError in fileserver update_opts
  • Loading branch information
Mike Place committed Jul 13, 2015
2 parents ae7138f + 7873d9e commit f64b32b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions salt/fileserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,11 @@ def master_opts(self, load):
def update_opts(self):
# This fix func monkey patching by pillar
for name, func in self.servers.items():
if '__opts__' in func.__globals__:
func.__globals__['__opts__'].update(self.opts)
try:
if '__opts__' in func.__globals__:
func.__globals__['__opts__'].update(self.opts)
except AttributeError:
pass

def clear_cache(self, back=None):
'''
Expand Down

0 comments on commit f64b32b

Please sign in to comment.