Skip to content

Commit

Permalink
add docstring for RunShellCmdResult namedtuple
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Oct 14, 2024
1 parent dd2ebf2 commit 63ac9e5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions easybuild/tools/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@

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


class RunShellCmdError(BaseException):
Expand Down

0 comments on commit 63ac9e5

Please sign in to comment.