X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2F__init__.py.in;h=ba17f1bed030ef01e8d445c44ed132fa0ca896bc;hb=ce4923b0c7a2de36eba95725334d251e9aa08aad;hp=1e5b8ee38c848c5081260361df6f7bd0bcbd9d62;hpb=19bb8b5a08e1ee2aadd42bf11f7ed8a62f36bd5b;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/__init__.py.in b/src/bindings/python/bt2/bt2/__init__.py.in index 1e5b8ee3..ba17f1be 100644 --- a/src/bindings/python/bt2/bt2/__init__.py.in +++ b/src/bindings/python/bt2/bt2/__init__.py.in @@ -37,6 +37,7 @@ 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.event import _Event from bt2.event_class import * from bt2.field_class import * @@ -67,19 +68,15 @@ from bt2.value import _IntegerValue from bt2.clock_snapshot import _UnknownClockSnapshot -class Error(Exception): - pass - - 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 @@ -99,7 +96,7 @@ class Stop(StopIteration): pass -class IncompleteUserClass(Error): +class IncompleteUserClass(Exception): pass @@ -107,7 +104,7 @@ class Canceled(Exception): pass -class NonexistentClockSnapshot(Error): +class NonexistentClockSnapshot(Exception): pass @@ -126,8 +123,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()