Merge "Using yaml.safe_load instead of yaml.load"
This commit is contained in:
commit
4611eeda44
@ -19,7 +19,7 @@ import inspect
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
from yaml import load
|
from yaml import safe_load
|
||||||
try:
|
try:
|
||||||
from yaml import CDumper as Dumper # noqa: F401
|
from yaml import CDumper as Dumper # noqa: F401
|
||||||
from yaml import CLoader as Loader # noqa: F401
|
from yaml import CLoader as Loader # noqa: F401
|
||||||
@ -42,7 +42,7 @@ class ActionModule(action.ActionBase):
|
|||||||
with open(source, 'r') as f:
|
with open(source, 'r') as f:
|
||||||
template_data = f.read()
|
template_data = f.read()
|
||||||
template_data = self._templar.template(template_data)
|
template_data = self._templar.template(template_data)
|
||||||
result = load(template_data)
|
result = safe_load(template_data)
|
||||||
return result or {}
|
return result or {}
|
||||||
|
|
||||||
def run(self, tmp=None, task_vars=None):
|
def run(self, tmp=None, task_vars=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user