From da9f4230a8c206a872f336333cfeae1996f02e50 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Thu, 9 Jan 2020 20:57:08 -0500 Subject: [PATCH] Print to stderr instead of raising error if version does not match --- tracetools_trace/tracetools_trace/tools/lttng.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tracetools_trace/tracetools_trace/tools/lttng.py b/tracetools_trace/tracetools_trace/tools/lttng.py index 6bcd0cb..782b9cf 100644 --- a/tracetools_trace/tracetools_trace/tools/lttng.py +++ b/tracetools_trace/tracetools_trace/tools/lttng.py @@ -29,8 +29,9 @@ try: current_version = _lttng.get_version() LTTNG_MIN_VERSION = '2.10.7' if current_version is None or current_version < StrictVersion(LTTNG_MIN_VERSION): - raise RuntimeError( - f'lttng module version >={LTTNG_MIN_VERSION} required, found {str(current_version)}' + print( + f'lttng module version >={LTTNG_MIN_VERSION} required, found {str(current_version)}', + file=sys.stderr, ) except ImportError: # Fall back on stub functions so that this still passes linter checks