Read output from a command with trailing whitespace stripped. On error, returns None.
(c, *k, **kw)
| 378 | |
| 379 | |
| 380 | def read_pipe_text(c, *k, **kw): |
| 381 | """Read output from a command with trailing whitespace stripped. On error, |
| 382 | returns None. |
| 383 | """ |
| 384 | retcode, out, err = read_pipe_full(c, *k, **kw) |
| 385 | if retcode != 0: |
| 386 | return None |
| 387 | else: |
| 388 | return decode_text_stream(out).rstrip() |
| 389 | |
| 390 | |
| 391 | def p4_read_pipe(c, ignore_error=False, raw=False, *k, **kw): |
no test coverage detected