hi all, i needed to run shell commands which returned non-0 return codes (on success), so i had to patch operations.py (see below). is this something which will be possible in fabric 1.x? best regards, robert
--- operations_old.py 2010-09-16 08:52:55.000000000 +0200 +++ operations.py 2010-09-16 08:42:07.000000000 +0200 @@ -373,7 +373,7 @@ @needs_host -def run(command, shell=True, pty=False): +def run(command, shell=True, pty=False, return_code=0): """ Run a shell command on a remote host. @@ -443,7 +443,7 @@ # Error handling out.failed = False - if status != 0: + if status != return_code: out.failed = True msg = "run() encountered an error (return code %s) while executing '%s'" % (status, command) _handle_failure(message=msg) _______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user