Silas Sewell wrote:
Merged and pushed. Thanks!
Adrian
---
func/minion/modules/command.py | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/func/minion/modules/command.py b/func/minion/modules/command.py
index 4706f30..b67535a 100644
--- a/func/minion/modules/command.py
+++ b/func/minion/modules/command.py
@@ -27,15 +27,9 @@ class Command(func_module.FuncModule):
Runs a command, returning the return code, stdout, and stderr
as a tuple.
NOT FOR USE WITH INTERACTIVE COMMANDS.
"""
-
-
- if env:
- cmdref = sub_process.Popen(command.split(),
stdout=sub_process.PIPE,
- stderr=sub_process.PIPE, shell=False,
- close_fds=True, env=env)
- else:
- cmdref = sub_process.Popen(command.split(),
stdout=sub_process.PIPE,
- stderr=sub_process.PIPE,
shell=False, close_fds=True)
+ cmdref = sub_process.Popen(command, stdout=sub_process.PIPE,
+ stderr=sub_process.PIPE, shell=True,
+ close_fds=True, env=env)
data = cmdref.communicate()
return (cmdref.returncode, data[0], data[1])
--
1.5.6.5
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list