Python babeltrace fix: handle bt2.Error exception on stream flush
[babeltrace.git] / bindings / python / babeltrace / babeltrace / writer.py
index 6ee53dc65569fe4dc8c6dad044da0d08d21d92f6..61d28a5161cf1729ff729e68c0fe9f4c66c48836 100644 (file)
@@ -1887,7 +1887,10 @@ class Stream:
         :exc:`ValueError` is raised on error.
         """
 
-        self._s.flush()
+        try:
+            self._s.flush()
+        except:
+            raise ValueError('Failed to flush CTF writer stream')
 
 
 class Writer:
This page took 0.025252 seconds and 4 git commands to generate.