From b5a45961e58a00e20d79dd634fb14c1db2d1c80b Mon Sep 17 00:00:00 2001 From: Viet Hung Nguyen Date: Fri, 25 Sep 2015 14:13:07 +0700 Subject: [PATCH] raise exception if keyfile specified but does not exist help user troubleshooting easier than return None --- salt/modules/ddns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/modules/ddns.py b/salt/modules/ddns.py index a88afb51f7..e1f50139bf 100644 --- a/salt/modules/ddns.py +++ b/salt/modules/ddns.py @@ -63,7 +63,7 @@ def _config(name, key=None, **kwargs): def _get_keyring(keyfile): keyring = None - if keyfile and __salt__['file.file_exists'](keyfile): + if keyfile: with salt.utils.fopen(keyfile) as _f: keyring = dns.tsigkeyring.from_text(json.load(_f)) return keyring