]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph: ignore BrokenPipeError when printing help 37100/head
authorErnesto Puerta <epuertat@redhat.com>
Fri, 11 Sep 2020 10:10:16 +0000 (12:10 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Tue, 15 Sep 2020 18:20:43 +0000 (20:20 +0200)
commit39768459f6e542dc4c18407fed4f8412abe759fe
tree05226f2e03a8f63080a4d9ec1de68c4c0a3a0c69
parent3627cd1e5cbc43630daa9774ed7159cdf4dbecf8
ceph: ignore BrokenPipeError when printing help

ignore BrokenPipeError which is thrown when piping the output of ceph
CLI to a tool which might close its stdin before ceph CLI sends the
whole help message.

Follow approach suggested by Kefu: https://github.com/python/cpython/commit/7b0ed43af55c1e2844aa0ccd5e088b2ddd38dbdb
This doesn't manage the clean-up/exit logic, as that's deferred to the
last part of the __main__ code.

Fixes: https://tracker.ceph.com/issues/47400
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
src/ceph.in