~lttng/babeltrace/trunk

« back to all changes in this revision

Viewing changes to src/bindings/python/bt2/bt2/trace.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:
9
9
from bt2 import value as bt2_value
10
10
from bt2 import stream as bt2_stream
11
11
from bt2 import stream_class as bt2_stream_class
12
 
import bt2
 
12
from bt2 import error as bt2_error
 
13
 
13
14
import functools
14
15
import uuid as uuidp
15
16
 
246
247
            )
247
248
 
248
249
        if stream_ptr is None:
249
 
            raise bt2._MemoryError("cannot create stream object")
 
250
            raise bt2_error._MemoryError("cannot create stream object")
250
251
 
251
252
        stream = bt2_stream._Stream._create_from_ptr(stream_ptr)
252
253