Print to stderr if lttng Python package is not found

This commit is contained in:
Christophe Bedard 2020-01-09 11:54:46 -05:00
parent 1328c9a665
commit 69ba4eadc4

View file

@ -14,6 +14,8 @@
"""Interface for tracing with LTTng.""" """Interface for tracing with LTTng."""
import sys
from typing import List from typing import List
from typing import Optional from typing import Optional
@ -23,6 +25,7 @@ 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