mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fileclient: Fix traceback when template file cannot be cached
When `cache_file` fails, `sfn` is `False`, which causes a traceback when checking for the cached path's existence. This fixes that traceback.
This commit is contained in:
parent
01bcff087e
commit
744dfd9a9a
1 changed files with 1 additions and 1 deletions
|
@ -735,7 +735,7 @@ class Client(object):
|
|||
kwargs['saltenv'] = saltenv
|
||||
url_data = urlparse(url)
|
||||
sfn = self.cache_file(url, saltenv, cachedir=cachedir)
|
||||
if not os.path.exists(sfn):
|
||||
if not sfn or not os.path.exists(sfn):
|
||||
return ''
|
||||
if template in salt.utils.templates.TEMPLATE_REGISTRY:
|
||||
data = salt.utils.templates.TEMPLATE_REGISTRY[template](
|
||||
|
|
Loading…
Add table
Reference in a new issue