Merge "Added check to see if the variable file is empty"
This commit is contained in:
commit
e7a6b27fd8
@ -157,6 +157,12 @@ def main():
|
|||||||
with open(user_vars_file, 'rb') as f:
|
with open(user_vars_file, 'rb') as f:
|
||||||
user_vars = yaml.safe_load(f.read())
|
user_vars = yaml.safe_load(f.read())
|
||||||
|
|
||||||
|
if not user_vars:
|
||||||
|
raise SystemExit(
|
||||||
|
'FAIL: The variable file provided [ %s ] is empty.'
|
||||||
|
% user_vars_file
|
||||||
|
)
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
generator = CredentialGenerator()
|
generator = CredentialGenerator()
|
||||||
for entry, value in user_vars.iteritems():
|
for entry, value in user_vars.iteritems():
|
||||||
|
Loading…
Reference in New Issue
Block a user