Merge pull request #52034 from terminalmage/fix-get-template

fileclient: Fix traceback when template file cannot be cached
This commit is contained in:
Daniel Wozniak 2019-03-07 12:41:23 -07:00 committed by GitHub
commit 75398e4807
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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](