Fix lint and formatting errors
This commit is contained in:
parent
de8c131a34
commit
82d2d26f9a
7 changed files with 32 additions and 17 deletions
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
from ros2cli.command import CommandExtension
|
from ros2cli.command import CommandExtension
|
||||||
from ros2trace.api import add_trace_arguments
|
from ros2trace.api import add_trace_arguments
|
||||||
from ros2trace.api import init
|
|
||||||
from ros2trace.api import fini
|
from ros2trace.api import fini
|
||||||
|
from ros2trace.api import init
|
||||||
|
|
||||||
|
|
||||||
class TraceCommand(CommandExtension):
|
class TraceCommand(CommandExtension):
|
||||||
|
|
|
@ -7,8 +7,14 @@ setup(
|
||||||
packages=find_packages(exclude=['test']),
|
packages=find_packages(exclude=['test']),
|
||||||
install_requires=['ros2cli'],
|
install_requires=['ros2cli'],
|
||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
maintainer='Christophe Bedard, Ingo Lütkebohle',
|
maintainer=(
|
||||||
maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com',
|
'Christophe Bedard, '
|
||||||
|
'Ingo Lütkebohle'
|
||||||
|
),
|
||||||
|
maintainer_email=(
|
||||||
|
'fixed-term.christophe.bourquebedard@de.bosch.com, '
|
||||||
|
'ingo.luetkebohle@de.bosch.com'
|
||||||
|
),
|
||||||
author='Christophe Bedard',
|
author='Christophe Bedard',
|
||||||
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
|
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
|
||||||
# url=',
|
# url=',
|
||||||
|
|
|
@ -14,8 +14,14 @@ setup(
|
||||||
('share/' + package_name + '/launch', glob.glob('launch/*.launch.py')),
|
('share/' + package_name + '/launch', glob.glob('launch/*.launch.py')),
|
||||||
],
|
],
|
||||||
install_requires=['setuptools'],
|
install_requires=['setuptools'],
|
||||||
maintainer='Christophe Bedard, Ingo Lütkebohle',
|
maintainer=(
|
||||||
maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com',
|
'Christophe Bedard, '
|
||||||
|
'Ingo Lütkebohle'
|
||||||
|
),
|
||||||
|
maintainer_email=(
|
||||||
|
'fixed-term.christophe.bourquebedard@de.bosch.com, '
|
||||||
|
'ingo.luetkebohle@de.bosch.com'
|
||||||
|
),
|
||||||
author='Christophe Bedard',
|
author='Christophe Bedard',
|
||||||
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
|
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
|
||||||
# url='',
|
# url='',
|
||||||
|
|
|
@ -11,8 +11,14 @@ setup(
|
||||||
('share/' + package_name, ['package.xml']),
|
('share/' + package_name, ['package.xml']),
|
||||||
],
|
],
|
||||||
install_requires=['setuptools'],
|
install_requires=['setuptools'],
|
||||||
maintainer='Christophe Bedard, Ingo Lütkebohle',
|
maintainer=(
|
||||||
maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com',
|
'Christophe Bedard, '
|
||||||
|
'Ingo Lütkebohle'
|
||||||
|
),
|
||||||
|
maintainer_email=(
|
||||||
|
'fixed-term.christophe.bourquebedard@de.bosch.com, '
|
||||||
|
'ingo.luetkebohle@de.bosch.com'
|
||||||
|
),
|
||||||
author='Christophe Bedard',
|
author='Christophe Bedard',
|
||||||
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
|
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
|
||||||
# url='',
|
# url='',
|
||||||
|
|
|
@ -32,9 +32,7 @@ class DefaultArgValueCompleter:
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
"""
|
"""Parse args for tracing."""
|
||||||
Parse args for tracing.
|
|
||||||
"""
|
|
||||||
parser = argparse.ArgumentParser(description='Setup and launch an LTTng tracing session.')
|
parser = argparse.ArgumentParser(description='Setup and launch an LTTng tracing session.')
|
||||||
add_arguments(parser)
|
add_arguments(parser)
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
"""Interface for tracing with LTTng."""
|
"""Interface for tracing with LTTng."""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
from typing import List
|
||||||
|
|
||||||
# Temporary workaround
|
# Temporary workaround
|
||||||
sys.path = ['/usr/local/lib/python3.6/site-packages'] + sys.path
|
sys.path = ['/usr/local/lib/python3.6/site-packages'] + sys.path
|
||||||
from typing import List
|
|
||||||
|
|
||||||
import lttng # noqa: E402
|
import lttng # noqa: E402
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ def _create_session(session_name: str, full_path: str) -> None:
|
||||||
if result == -LTTNG_ERR_EXIST_SESS:
|
if result == -LTTNG_ERR_EXIST_SESS:
|
||||||
# Sessions seem to persist, so if it already exists,
|
# Sessions seem to persist, so if it already exists,
|
||||||
# just destroy it and try again
|
# just destroy it and try again
|
||||||
lttng_destroy(session_name)
|
_lttng_destroy(session_name)
|
||||||
result = lttng.create(session_name, full_path)
|
result = lttng.create(session_name, full_path)
|
||||||
if result < 0:
|
if result < 0:
|
||||||
raise RuntimeError(f'session creation failed: {lttng.strerror(result)}')
|
raise RuntimeError(f'session creation failed: {lttng.strerror(result)}')
|
||||||
|
|
|
@ -19,7 +19,6 @@ import os
|
||||||
|
|
||||||
from tracetools_trace.tools import args
|
from tracetools_trace.tools import args
|
||||||
from tracetools_trace.tools import lttng
|
from tracetools_trace.tools import lttng
|
||||||
from tracetools_trace.tools import names
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue