]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: ignore failures to flush stdout 37143/head
authorDan van der Ster <daniel.vanderster@cern.ch>
Mon, 14 Sep 2020 14:23:53 +0000 (16:23 +0200)
committerDan van der Ster <daniel.vanderster@cern.ch>
Mon, 14 Sep 2020 14:32:52 +0000 (16:32 +0200)
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>
src/ceph.in

index b2ceafbae65b8465257173e849f148e6814623a4..be66bc0814684f2ccba6fe491672ed5e47916b0e 100755 (executable)
@@ -1253,8 +1253,12 @@ def main():
                 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: