sudo result refactoring
@@ -102,7 +102,7 @@ class Sudo(GenericUnixCommand):
if self.timeout_from_embedded_command and prev_cmd_timeout != new_cmd_timeout:
timedelta = new_cmd_timeout - prev_cmd_timeout
self.extend_timeout(timedelta=timedelta)
- self.current_ret["cmd_ret"] = self.cmd_object.current_ret
+ self.current_ret = self.cmd_object.current_ret
if self.cmd_object.done():
try:
self.cmd_object.result()
@@ -198,7 +198,7 @@ root
user@client:~/moler$ """
COMMAND_RESULT_whoami = {
- "cmd_ret": {"USER": "root"}
+ "USER": "root"
}
COMMAND_KWARGS_whoami = {
@@ -251,14 +251,12 @@ Starting Nmap 6.47 ( http://nmap.org ) at 2019-06-21 14:33 CEST
user@client:~/moler$ """
COMMAND_RESULT_dynamic_timeout = {
- 'cmd_ret': {
'SYN_STEALTH_SCAN': {
'DONE': '8.35',
'ETC': '14:57',
'REMAINING': '0:22:08'
}
}
-}
COMMAND_KWARGS_dynamic_timeout = {
'cmd_class_name': r'moler.cmd.unix.nmap.Nmap',
@@ -283,7 +281,6 @@ lrwxrwxrwx 1 root root 10 Mar 20 2015 logsremote -> /mnt/logs/
user@client:~/moler$ """
COMMAND_RESULT_ls = {
- "cmd_ret": {
"total": {
"raw": "8",
"bytes": 8,
@@ -308,7 +305,6 @@ COMMAND_RESULT_ls = {
"size_bytes": 10, "size_raw": "10", "date": "Mar 20 2015", "name": "logsremote",
"link": "/mnt/logs/"},
},
- },
}
COMMAND_KWARGS_ls = {
