Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-pw: Gracefully handle filters closing the stdout pipe
When piping git pw through a pipe to a filter, the filter may close its stdin early (for instance git pw list -j | head) and the next write to stdout from git pw will raise an exception: Traceback (most recent call last): File "/home/damien/.local/bin/git-pw", line 912, in <module> ret = git_pw.run() File "/home/damien/.local/bin/git-pw", line 756, in run ret = getattr(self, method)() File "/home/damien/.local/bin/git-pw", line 653, in do_list print(json.dumps(series)) IOError: [Errno 32] Broken pipe We do want to play nice with those filters too, to just catch that IOError with errno set to EPIPE and exit without complaining. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
- Loading branch information