Fix lttng error value

This commit is contained in:
Christophe Bedard 2019-06-06 09:24:32 +02:00
parent 031f30460a
commit a577710ef1

View file

@ -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)