~lttng/babeltrace/trunk

« back to all changes in this revision

Viewing changes to src/bindings/python/bt2/bt2/interrupter.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:
4
4
 
5
5
from bt2 import native_bt
6
6
from bt2 import object as bt2_object
7
 
import bt2
 
7
from bt2 import error as bt2_error
8
8
 
9
9
 
10
10
class Interrupter(bt2_object._SharedObject):
20
20
        ptr = native_bt.interrupter_create()
21
21
 
22
22
        if ptr is None:
23
 
            raise bt2._MemoryError("cannot create interrupter object")
 
23
            raise bt2_error._MemoryError("cannot create interrupter object")
24
24
 
25
25
        super().__init__(ptr)
26
26