issue #554: mitogen_action_script fix

pull/564/head
David Wilson 6 years ago
parent 6309774be2
commit 30b8172573

@ -5,6 +5,21 @@ import sys
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
try:
long
except NameError:
long = int
try:
unicode
except NameError:
unicode = str
try:
bytes
except NameError:
bytes = str
def execute(s, gbls, lcls): def execute(s, gbls, lcls):
if sys.version_info > (3,): if sys.version_info > (3,):
@ -29,6 +44,11 @@ class ActionModule(ActionBase):
for key in pre_keys: for key in pre_keys:
del lcls[key] del lcls[key]
for key in list(lcls):
if not isinstance(lcls[key],
(unicode, bytes, int, long, dict, list, tuple,
bool)):
del lcls[key]
return lcls return lcls

Loading…
Cancel
Save