X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fevent_class.py;h=b165d3211ec16d655f36a791c1fc7d34d80a5d8a;hb=7993562851b443afb3801e5bf2b88d674734808b;hp=b981d1e7cafbc76b02648dbf970c410fcb8befaf;hpb=602d20a206a92e112d10baf84cb5163241a390f7;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/event_class.py b/src/bindings/python/bt2/bt2/event_class.py index b981d1e7..b165d321 100644 --- a/src/bindings/python/bt2/bt2/event_class.py +++ b/src/bindings/python/bt2/bt2/event_class.py @@ -23,7 +23,12 @@ from bt2 import native_bt, object, utils from bt2 import field_class as bt2_field_class from bt2 import value as bt2_value -from bt2 import stream_class as bt2_stream_class + + +def _bt2_stream_class(): + from bt2 import stream_class as bt2_stream_class + + return bt2_stream_class class EventClassLogLevel: @@ -65,7 +70,7 @@ class _EventClassConst(object._SharedObject): _create_value_from_ptr_and_get_ref = staticmethod( bt2_value._create_from_const_ptr_and_get_ref ) - _stream_class_pycls = property(lambda s: bt2_stream_class._StreamClassConst) + _stream_class_pycls = property(lambda s: _bt2_stream_class()._StreamClassConst) @property def stream_class(self): @@ -138,7 +143,7 @@ class _EventClass(_EventClassConst): _create_value_from_ptr_and_get_ref = staticmethod( bt2_value._create_from_ptr_and_get_ref ) - _stream_class_pycls = property(lambda s: bt2_stream_class._StreamClass) + _stream_class_pycls = property(lambda s: _bt2_stream_class()._StreamClass) def _user_attributes(self, user_attributes): value = bt2_value.create_value(user_attributes)