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=f80cf658622ed876a13942d9f416449d1698b4de;hpb=578e048b5debf169e286e5b5cc747b5d6c16886d;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/__init__.py.in b/src/bindings/python/bt2/bt2/__init__.py.in index f80cf658..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 @@ -62,49 +66,42 @@ from bt2.trace_collection_message_iterator import * from bt2.value import * from bt2.value import _Value 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 InvalidQueryObject(Error): - pass +class _MemoryError(_Error): + '''Raised when an operation fails due to memory issues.''' -class InvalidQueryParams(Error): +class InvalidObject(Exception): pass -class TryAgain(Exception): +class InvalidParams(Exception): pass -class Stop(StopIteration): +class OverflowError(OverflowError): pass -class PortConnectionRefused(Exception): +class Unsupported(Exception): pass -class IncompleteUserClass(Error): +class TryAgain(Exception): pass -class GraphCanceled(Exception): +class Stop(StopIteration): pass -class QueryExecutorCanceled(Exception): +class IncompleteUserClass(Exception): pass -class NonexistentClockSnapshot(Error): +class Canceled(Exception): pass @@ -118,10 +115,14 @@ def _init_and_register_exit(): import bt2.native_bt as _native_bt import atexit - atexit.register(_native_bt.py3_cc_exit_handler) - version = (_native_bt.version_get_major(), _native_bt.version_get_minor(), - _native_bt.version_get_patch(), _native_bt.version_get_extra()) - _native_bt.py3_cc_init_from_bt2() + 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(), + ) + _native_bt.bt2_cc_init_from_bt2() _init_and_register_exit()