Fix: bt2: replace bt2.CreationError instances with bt2._MemoryError
authorSimon Marchi <simon.marchi@efficios.com>
Sun, 11 Aug 2019 02:31:41 +0000 (22:31 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 12 Aug 2019 02:21:54 +0000 (22:21 -0400)
Commit

    4acc866e8298 ("bt2: rename CreationError to MemoryError, handle it in and out of Python bindings")

removed bt2.CreationError in favor of bt2.MemoryError (now
bt2._MemoryError).  However, some usages of bt2.CreationError were
introduced afterwards, probably by patches that were in the pipeline.
Replace them with bt2._MemoryError.

Change-Id: Id3cb6542e507b1e41c165ca61df21069d72fb44f
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1867
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/bindings/python/bt2/bt2/component.py
src/bindings/python/bt2/bt2/interrupter.py
src/bindings/python/bt2/bt2/message_iterator.py

index 72376ef97a5445f33b577594e2d36860f40b6dc3..49aed23f14db8a56ba198b633c72aa331c30495b 100644 (file)
@@ -872,7 +872,7 @@ class _UserSinkComponent(_UserComponent, _SinkComponent):
         )
 
         if msg_iter_ptr is None:
-            raise bt2.CreationError('cannot create message iterator object')
+            raise bt2._MemoryError('cannot create message iterator object')
 
         return bt2_message_iterator._UserComponentInputPortMessageIterator(msg_iter_ptr)
 
index 9c9868d19d5b7fe374b939287cc03e093079dbfa..576dc3b9478b5248d993ef85ea064c35f3f91f7e 100644 (file)
@@ -31,7 +31,7 @@ class Interrupter(object._SharedObject):
         ptr = native_bt.interrupter_create()
 
         if ptr is None:
-            raise bt2.CreationError('cannot create interrupter object')
+            raise bt2._MemoryError('cannot create interrupter object')
 
         super().__init__(ptr)
 
index 1a48b8117b2bc04a4d33e751a5d8c7ff7551fee2..23e2c9a6a0c0257eeead66b184c610e768bf8d2b 100644 (file)
@@ -181,7 +181,7 @@ class _UserMessageIterator(_MessageIterator):
         )
 
         if msg_iter_ptr is None:
-            raise bt2.CreationError('cannot create message iterator object')
+            raise bt2._MemoryError('cannot create message iterator object')
 
         return _UserComponentInputPortMessageIterator(msg_iter_ptr)
 
This page took 0.026673 seconds and 4 git commands to generate.