diff --git a/scripts/pw-token-gen.py b/scripts/pw-token-gen.py index f5f70c09b0..5deee8e5af 100755 --- a/scripts/pw-token-gen.py +++ b/scripts/pw-token-gen.py @@ -157,6 +157,12 @@ def main(): with open(user_vars_file, 'rb') as f: 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 generator = CredentialGenerator() for entry, value in user_vars.iteritems():