From b6fb07a436d6ae977285147014357092e83dabf9 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Tue, 12 May 2020 18:57:11 +0200 Subject: [PATCH] better docstring --- bin/zfs-autobackup | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/zfs-autobackup b/bin/zfs-autobackup index a605c59..67184a3 100755 --- a/bin/zfs-autobackup +++ b/bin/zfs-autobackup @@ -311,11 +311,14 @@ class ExecuteNode: def run(self, cmd, input=None, tab_split=False, valid_exitcodes=[ 0 ], readonly=False, hide_errors=False, pipe=False, return_stderr=False): """run a command on the node - - readonly: make this True if the command doesn't make any changes and is safe to execute in testmode - pipe: Instead of executing, return a pipe-handle to be used to input to another run() command. (just like a | in linux) + cmd: the actual command, should be a list, where the first item is the command and the rest are parameters. input: Can be None, a string or a pipe-handle you got from another run() - return_stderr: return both stdout and stderr as a tuple + tab_split: split tabbed files in output into a list + valid_exitcodes: list of valid exit codes for this command (checks exit code of both sides of a pipe) + readonly: make this True if the command doesn't make any changes and is safe to execute in testmode + hide_errors: don't show stderr output as error, instead show it as debugging output (use to hide expected errors) + pipe: Instead of executing, return a pipe-handle to be used to input to another run() command. (just like a | in linux) + return_stderr: return both stdout and stderr as a tuple. (only returns stderr from this side of the pipe) """ encoded_cmd=[]