Browse Source

Print helpful exception is pillar node information is missing (or otherwise broken).

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 7 years ago
parent
commit
b4f3a8919f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      _modules/ffho_auth.py

+ 3 - 0
_modules/ffho_auth.py

@@ -7,6 +7,9 @@
 import collections
 
 def _ssh_user_allowed (access_config, node_id, node_config, entry_name):
+	if type (node_config) not in [ dict, collections.OrderedDict ]:
+		raise Exception ("The pillar node config of node \"%s\" seem to be broken or missing!" % node_id)
+
 	roles = node_config.get ('roles', [])
 
 	# Access config for the given user is the string "global"