X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2F__init__.py.in;h=bf36b459517055fe8a68526eca8db84fd0881d5b;hb=b189a968258bcf286f022208b71849f8194828bb;hp=0faede10cc664ed514f54099296e08d081e1b55c;hpb=d24d56638469189904fb6ddbb3c725817b3e9417;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/__init__.py.in b/src/bindings/python/bt2/bt2/__init__.py.in index 0faede10..bf36b459 100644 --- a/src/bindings/python/bt2/bt2/__init__.py.in +++ b/src/bindings/python/bt2/bt2/__init__.py.in @@ -37,16 +37,20 @@ 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 * from bt2.field_path import * from bt2.field import * from bt2.graph import * +from bt2.integer_range_set import * from bt2.logging import * from bt2.message import * from bt2.message import _DiscardedEventsMessage from bt2.message import _DiscardedPacketsMessage +from bt2.message import _EventMessage from bt2.message_iterator import * from bt2.message_iterator import _UserMessageIterator from bt2.packet import _Packet @@ -63,22 +67,17 @@ from bt2.value import * from bt2.value import _Value from bt2.value import _IntegerValue from bt2.clock_snapshot import _UnknownClockSnapshot -from bt2.clock_snapshot import _InfiniteClockSnapshot -class Error(Exception): - pass - - -class CreationError(Error): - '''Raised when object creation fails due to memory issues.''' +class _MemoryError(_Error): + '''Raised when an operation fails due to memory issues.''' -class InvalidObject(Error): +class InvalidObject(Exception): pass -class InvalidParams(Error): +class InvalidParams(Exception): pass @@ -98,7 +97,7 @@ class Stop(StopIteration): pass -class IncompleteUserClass(Error): +class IncompleteUserClass(Exception): pass @@ -106,14 +105,6 @@ class Canceled(Exception): pass -class NonexistentClockSnapshot(Error): - pass - - -class LoadingError(Error): - pass - - class _ListenerHandle: def __init__(self, listener_id, obj): self._listener_id = listener_id @@ -125,8 +116,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()