From a577710ef1eede03880947a29844aa698dd60a9f Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Thu, 6 Jun 2019 09:24:32 +0200 Subject: [PATCH] Fix lttng error value --- tracing/lttng.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracing/lttng.py b/tracing/lttng.py index cda2cf4..b790d5b 100644 --- a/tracing/lttng.py +++ b/tracing/lttng.py @@ -111,8 +111,8 @@ def _create_session(session_name, directory): Create session from name and directory path, and check for errors """ result = create(session_name, directory) - LTTNG_ERR_EXIST_SESS = -28 - if result == LTTNG_ERR_EXIST_SESS: + LTTNG_ERR_EXIST_SESS = 28 + if result == -LTTNG_ERR_EXIST_SESS: # Sessions seem to persist, so if it already exists, # just destroy it and try again lttng_destroy(session_name)