X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fquery_executor.py;h=146a2cf461b81b2cb59633d3e3049b8f7952e9ef;hb=3fb99a226ccb40c79de6b55b5a249d93b9c5262e;hp=2a99ef961a1299fddda2c45c2873bdc54f21a9bb;hpb=90ab1cfa06fc5b2d195a907361d3cee8b5646b44;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/query_executor.py b/src/bindings/python/bt2/bt2/query_executor.py index 2a99ef96..146a2cf4 100644 --- a/src/bindings/python/bt2/bt2/query_executor.py +++ b/src/bindings/python/bt2/bt2/query_executor.py @@ -21,9 +21,10 @@ # THE SOFTWARE. from bt2 import native_bt, object, utils -import bt2.interrupter -import bt2.component -import bt2.logging +from bt2 import interrupter as bt2_interrupter +from bt2 import component as bt2_component +from bt2 import logging as bt2_logging +from bt2 import value as bt2_value import bt2 @@ -40,7 +41,7 @@ class QueryExecutor(object._SharedObject): super().__init__(ptr) def add_interrupter(self, interrupter): - utils._check_type(interrupter, bt2.interrupter.Interrupter) + utils._check_type(interrupter, bt2_interrupter.Interrupter) native_bt.query_executor_add_interrupter(self._ptr, interrupter._ptr) def interrupt(self): @@ -56,13 +57,13 @@ class QueryExecutor(object._SharedObject): component_class, object, params=None, - logging_level=bt2.logging.LoggingLevel.NONE, + logging_level=bt2_logging.LoggingLevel.NONE, ): - if not isinstance(component_class, bt2.component._ComponentClass): + if not isinstance(component_class, bt2_component._ComponentClass): err = False try: - if not issubclass(component_class, bt2.component._UserComponent): + if not issubclass(component_class, bt2_component._UserComponent): err = True except TypeError: err = True @@ -87,4 +88,4 @@ class QueryExecutor(object._SharedObject): ) utils._handle_func_status(status, 'cannot query component class') assert result_ptr - return bt2.value._create_from_ptr(result_ptr) + return bt2_value._create_from_ptr(result_ptr)