Merge pull request #6 from yottatsa/master
Fix empty array get
diff --git a/salt/minion/cert.sls b/salt/minion/cert.sls
index 8dc2e45..adea4f6 100644
--- a/salt/minion/cert.sls
+++ b/salt/minion/cert.sls
@@ -69,7 +69,7 @@
- watch:
- x509: {{ cert_file }}
-{%- for ca_path,ca_cert in salt['mine.get'](cert.host, 'x509.get_pem_entries')[cert.host].iteritems() %}
+{%- for ca_path,ca_cert in salt['mine.get'](cert.host, 'x509.get_pem_entries').get(cert.host, {}).iteritems() %}
{%- if '/etc/pki/ca/'+cert.authority in ca_path %}