mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 12:25:01 -02:30
Merge pull request #36 from chrismeyersfsu/fix-extra_vars_comments
extra_vars_dict: handle the case where an entire yaml file is commented
This commit is contained in:
@@ -90,6 +90,9 @@ class VarsDictProperty(object):
|
|||||||
if d is None:
|
if d is None:
|
||||||
try:
|
try:
|
||||||
d = yaml.safe_load(v)
|
d = yaml.safe_load(v)
|
||||||
|
# This can happen if the whole file is commented out
|
||||||
|
if d is None:
|
||||||
|
d = {}
|
||||||
except yaml.YAMLError:
|
except yaml.YAMLError:
|
||||||
pass
|
pass
|
||||||
if d is None and self.key_value:
|
if d is None and self.key_value:
|
||||||
|
|||||||
Reference in New Issue
Block a user