~lttng/babeltrace/trunk

« back to all changes in this revision

Viewing changes to src/bindings/python/bt2/bt2/query_executor.py

  • Committer: Philippe Proulx
  • Author(s): Simon Marchi
  • Date: 2023-09-21 17:29:44 UTC
  • Revision ID: git-v1:c345b07873b0cb0ed344bde32a322a1b1edf60ae
python: remove internal `import bt2` imports

Standardize the internal imports to import specific modules like this:

    from bt2 import foo as bt2_foo

... instead of importing the complete bt2 package.

Change-Id: I32eb223a8bcfe841020a2aafb976f121dadd8680
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10388
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
from bt2 import utils as bt2_utils
8
8
from bt2 import interrupter as bt2_interrupter
9
9
from bt2 import value as bt2_value
10
 
import bt2
 
10
from bt2 import error as bt2_error
11
11
 
12
12
 
13
13
def _bt2_component():
62
62
        if params is None:
63
63
            params_ptr = native_bt.value_null
64
64
        else:
65
 
            params = bt2.create_value(params)
 
65
            params = bt2_value.create_value(params)
66
66
            params_ptr = params._ptr
67
67
 
68
68
        cc_ptr = component_class._bt_component_class_ptr()
80
80
        )
81
81
 
82
82
        if ptr is None:
83
 
            raise bt2._MemoryError("cannot create query executor object")
 
83
            raise bt2_error._MemoryError("cannot create query executor object")
84
84
 
85
85
        super().__init__(ptr)
86
86