From fad5fb5f5886220486f7d4d23abc7af08e9a25e7 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Fri, 23 Jan 2015 11:00:16 -0500 Subject: [PATCH] extra_vars_dict: handle the case where an entire yaml file is commented --- awx/main/models/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/main/models/base.py b/awx/main/models/base.py index 84b3f86508..1a221669b4 100644 --- a/awx/main/models/base.py +++ b/awx/main/models/base.py @@ -90,6 +90,9 @@ class VarsDictProperty(object): if d is None: try: d = yaml.safe_load(v) + # This can happen if the whole file is commented out + if d is None: + d = {} except yaml.YAMLError: pass if d is None and self.key_value: