lib: add bt_{graph,query_executor}_add_interrupter()
[babeltrace.git] / src / bindings / python / bt2 / bt2 / __init__.py.in
index 1e5b8ee38c848c5081260361df6f7bd0bcbd9d62..01c87e51c238f932ccaf16803dccf6e019a2d64b 100644 (file)
@@ -23,6 +23,7 @@
 __version__ = '@PACKAGE_VERSION@'
 
 
+from bt2.interrupter import *
 from bt2.clock_class import *
 from bt2.clock_snapshot import *
 from bt2.component import *
@@ -37,6 +38,8 @@ from bt2.component import _UserSinkComponent
 from bt2.component import _UserSourceComponent
 from bt2.connection import *
 from bt2.connection import _Connection
+from bt2.error import *
+from bt2.error import _Error
 from bt2.event import _Event
 from bt2.event_class import *
 from bt2.field_class import *
@@ -67,19 +70,15 @@ from bt2.value import _IntegerValue
 from bt2.clock_snapshot import _UnknownClockSnapshot
 
 
-class Error(Exception):
-    pass
-
+class _MemoryError(_Error):
+    '''Raised when an operation fails due to memory issues.'''
 
-class CreationError(Error):
-    '''Raised when object creation fails due to memory issues.'''
 
-
-class InvalidObject(Error):
+class InvalidObject(Exception):
     pass
 
 
-class InvalidParams(Error):
+class InvalidParams(Exception):
     pass
 
 
@@ -87,10 +86,6 @@ class OverflowError(OverflowError):
     pass
 
 
-class Unsupported(Exception):
-    pass
-
-
 class TryAgain(Exception):
     pass
 
@@ -99,19 +94,7 @@ class Stop(StopIteration):
     pass
 
 
-class IncompleteUserClass(Error):
-    pass
-
-
-class Canceled(Exception):
-    pass
-
-
-class NonexistentClockSnapshot(Error):
-    pass
-
-
-class LoadingError(Error):
+class IncompleteUserClass(Exception):
     pass
 
 
@@ -126,8 +109,12 @@ def _init_and_register_exit():
     import atexit
 
     atexit.register(_native_bt.bt2_cc_exit_handler)
-    version = (_native_bt.version_get_major(), _native_bt.version_get_minor(),
-               _native_bt.version_get_patch(), _native_bt.version_get_extra())
+    version = (
+        _native_bt.version_get_major(),
+        _native_bt.version_get_minor(),
+        _native_bt.version_get_patch(),
+        _native_bt.version_get_extra(),
+    )
     _native_bt.bt2_cc_init_from_bt2()
 
 
This page took 0.02488 seconds and 4 git commands to generate.