reactor: ensure glob_ref is a string

When path does not exist, cp.cache_file returns False, which will cause
a traceback when we attempt to glob that path.
This commit is contained in:
Erik Johnson 2017-01-23 16:15:13 -06:00
parent 2e443d79a3
commit fbc4d2a2c4

View file

@ -58,7 +58,7 @@ class Reactor(salt.utils.process.SignalHandlingMultiprocessingProcess, salt.stat
react = {}
if glob_ref.startswith('salt://'):
glob_ref = self.minion.functions['cp.cache_file'](glob_ref)
glob_ref = self.minion.functions['cp.cache_file'](glob_ref) or ''
globbed_ref = glob.glob(glob_ref)
if not globbed_ref:
log.error('Can not render SLS {0} for tag {1}. File missing or not found.'.format(glob_ref, tag))