Catch an IOError exception when flushing ceph stdout.
Fixes: https://tracker.ceph.com/issues/47442
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit
48503413a28fbea32f8ef3d48cb765771216f165)
except IOError as e:
if e.errno != errno.EPIPE:
raise e
+ try:
+ sys.stdout.flush()
+ except IOError as e:
+ if e.errno != errno.EPIPE:
+ raise e
- sys.stdout.flush()
# Block until command completion (currently scrub and deep_scrub only)
if block: