Skip to content

Commit 63ac9e5

Browse files
committed
add docstring for RunShellCmdResult namedtuple
1 parent dd2ebf2 commit 63ac9e5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

easybuild/tools/run.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@
8888

8989
RunShellCmdResult = namedtuple('RunShellCmdResult', ('cmd', 'exit_code', 'output', 'stderr', 'work_dir',
9090
'out_file', 'err_file', 'cmd_sh', 'thread_id', 'task_id'))
91+
RunShellCmdResult.__doc__ = """A namedtuple that represents the result of a call to run_shell_cmd,
92+
with the following fields:
93+
- cmd: the command that was executed;
94+
- exit_code: the exit code of the command (zero if it was succesful, non-zero if not);
95+
- output: output of the command (stdout+stderr combined, only stdout if stderr was caught separately);
96+
- stderr: stderr output produced by the command, if caught separately (None otherwise);
97+
- work_dir: the working directory of the command;
98+
- out_file: path to file with output of command (stdout+stderr combined, only stdout if stderr was caught separately);
99+
- err_file: path to file with stderr output of command, if caught separately (None otherwise);
100+
- cmd_sh: path to script to set up interactive shell with environment in which command was executed;
101+
- thread_id: thread ID of command that was executed (None unless asynchronous mode was enabled for running command);
102+
- task_id: task ID of command, if it was specified (None otherwise);
103+
"""
91104

92105

93106
class RunShellCmdError(BaseException):

0 commit comments

Comments
 (0)