mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #52034 from terminalmage/fix-get-template
fileclient: Fix traceback when template file cannot be cached
This commit is contained in:
commit
75398e4807
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