diff --git a/ros2trace/ros2trace/command/trace.py b/ros2trace/ros2trace/command/trace.py index ee03363..896c6f7 100644 --- a/ros2trace/ros2trace/command/trace.py +++ b/ros2trace/ros2trace/command/trace.py @@ -16,8 +16,8 @@ from ros2cli.command import CommandExtension from ros2trace.api import add_trace_arguments -from ros2trace.api import init from ros2trace.api import fini +from ros2trace.api import init class TraceCommand(CommandExtension): diff --git a/ros2trace/setup.py b/ros2trace/setup.py index 4add34d..ba8cb62 100644 --- a/ros2trace/setup.py +++ b/ros2trace/setup.py @@ -7,8 +7,14 @@ setup( packages=find_packages(exclude=['test']), install_requires=['ros2cli'], zip_safe=True, - maintainer='Christophe Bedard, Ingo Lütkebohle', - maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com', + maintainer=( + 'Christophe Bedard, ' + 'Ingo Lütkebohle' + ), + maintainer_email=( + 'fixed-term.christophe.bourquebedard@de.bosch.com, ' + 'ingo.luetkebohle@de.bosch.com' + ), author='Christophe Bedard', author_email='fixed-term.christophe.bourquebedard@de.bosch.com', # url=', diff --git a/tracetools_launch/setup.py b/tracetools_launch/setup.py index f6c6015..06512e6 100644 --- a/tracetools_launch/setup.py +++ b/tracetools_launch/setup.py @@ -14,8 +14,14 @@ setup( ('share/' + package_name + '/launch', glob.glob('launch/*.launch.py')), ], install_requires=['setuptools'], - maintainer='Christophe Bedard, Ingo Lütkebohle', - maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com', + maintainer=( + 'Christophe Bedard, ' + 'Ingo Lütkebohle' + ), + maintainer_email=( + 'fixed-term.christophe.bourquebedard@de.bosch.com, ' + 'ingo.luetkebohle@de.bosch.com' + ), author='Christophe Bedard', author_email='fixed-term.christophe.bourquebedard@de.bosch.com', # url='', diff --git a/tracetools_trace/setup.py b/tracetools_trace/setup.py index c28f6b1..a39808d 100644 --- a/tracetools_trace/setup.py +++ b/tracetools_trace/setup.py @@ -11,8 +11,14 @@ setup( ('share/' + package_name, ['package.xml']), ], install_requires=['setuptools'], - maintainer='Christophe Bedard, Ingo Lütkebohle', - maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com', + maintainer=( + 'Christophe Bedard, ' + 'Ingo Lütkebohle' + ), + maintainer_email=( + 'fixed-term.christophe.bourquebedard@de.bosch.com, ' + 'ingo.luetkebohle@de.bosch.com' + ), author='Christophe Bedard', author_email='fixed-term.christophe.bourquebedard@de.bosch.com', # url='', diff --git a/tracetools_trace/tracetools_trace/tools/args.py b/tracetools_trace/tracetools_trace/tools/args.py index 09938ae..d36541e 100644 --- a/tracetools_trace/tracetools_trace/tools/args.py +++ b/tracetools_trace/tracetools_trace/tools/args.py @@ -32,9 +32,7 @@ class DefaultArgValueCompleter: def parse_args(): - """ - Parse args for tracing. - """ + """Parse args for tracing.""" parser = argparse.ArgumentParser(description='Setup and launch an LTTng tracing session.') add_arguments(parser) return parser.parse_args() @@ -52,15 +50,15 @@ def add_arguments(parser): arg = parser.add_argument( '--ust', '-u', nargs='*', dest='events_ust', default=names.DEFAULT_EVENTS_ROS, help='the ROS UST events to enable (default: all events) ' - '[to disable all UST events, ' - 'provide this flag without any event name]') + '[to disable all UST events, ' + 'provide this flag without any event name]') arg.completer = DefaultArgValueCompleter(arg) arg = parser.add_argument( '--kernel', '-k', nargs='*', dest='events_kernel', default=names.DEFAULT_EVENTS_KERNEL, help='the kernel events to enable (default: all events) ' - '[to disable all UST events, ' - 'provide this flag without any event name]') + '[to disable all UST events, ' + 'provide this flag without any event name]') arg.completer = DefaultArgValueCompleter(arg) parser.add_argument( '--list', '-l', dest='list', action='store_true', diff --git a/tracetools_trace/tracetools_trace/tools/lttng.py b/tracetools_trace/tracetools_trace/tools/lttng.py index 3c54c91..25dd47c 100644 --- a/tracetools_trace/tracetools_trace/tools/lttng.py +++ b/tracetools_trace/tracetools_trace/tools/lttng.py @@ -15,10 +15,10 @@ """Interface for tracing with LTTng.""" import sys +from typing import List # Temporary workaround sys.path = ['/usr/local/lib/python3.6/site-packages'] + sys.path -from typing import List import lttng # noqa: E402 @@ -206,7 +206,7 @@ def _create_session(session_name: str, full_path: str) -> None: 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) + _lttng_destroy(session_name) result = lttng.create(session_name, full_path) if result < 0: raise RuntimeError(f'session creation failed: {lttng.strerror(result)}') diff --git a/tracetools_trace/tracetools_trace/trace.py b/tracetools_trace/tracetools_trace/trace.py index 055e63d..679acff 100644 --- a/tracetools_trace/tracetools_trace/trace.py +++ b/tracetools_trace/tracetools_trace/trace.py @@ -19,7 +19,6 @@ import os from tracetools_trace.tools import args from tracetools_trace.tools import lttng -from tracetools_trace.tools import names def main():