Raise RuntimeError instead of printing warning if lttng module not found
This commit is contained in:
parent
69ba4eadc4
commit
1366f709e1
2 changed files with 7 additions and 5 deletions
|
@ -25,7 +25,6 @@ try:
|
||||||
_lttng = lttng_impl
|
_lttng = lttng_impl
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# Fall back on empty functions
|
# Fall back on empty functions
|
||||||
print('Warning: lttng Python package not found', file=sys.stderr)
|
|
||||||
from . import lttng_stub
|
from . import lttng_stub
|
||||||
|
|
||||||
_lttng = lttng_stub
|
_lttng = lttng_stub
|
||||||
|
|
|
@ -15,17 +15,20 @@
|
||||||
"""Stub version of the interface for tracing with LTTng."""
|
"""Stub version of the interface for tracing with LTTng."""
|
||||||
|
|
||||||
|
|
||||||
|
ERROR_MESSAGE = 'lttng Python module not found'
|
||||||
|
|
||||||
|
|
||||||
def setup(*args, **kwargs) -> None:
|
def setup(*args, **kwargs) -> None:
|
||||||
pass
|
raise RuntimeError(ERROR_MESSAGE)
|
||||||
|
|
||||||
|
|
||||||
def start(*args, **kwargs) -> None:
|
def start(*args, **kwargs) -> None:
|
||||||
pass
|
raise RuntimeError(ERROR_MESSAGE)
|
||||||
|
|
||||||
|
|
||||||
def stop(*args, **kwargs) -> None:
|
def stop(*args, **kwargs) -> None:
|
||||||
pass
|
raise RuntimeError(ERROR_MESSAGE)
|
||||||
|
|
||||||
|
|
||||||
def destroy(*args, **kwargs) -> None:
|
def destroy(*args, **kwargs) -> None:
|
||||||
pass
|
raise RuntimeError(ERROR_MESSAGE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue