Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(record): positional arguments error #42

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions ros2caret/verb/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os

from ros2caret.verb import VerbExtension

from tracetools_trace.tools import names, path
Expand Down Expand Up @@ -44,19 +46,19 @@ def main(self, *, args):
context_fields = names.DEFAULT_CONTEXT
events_kernel = []

# Note: since key name of context_fields differs in galactic and humble,
# here, arguments are given as tuple.
init(
args.session_name,
args.path,
events_ust,
events_kernel,
context_fields,
args.list,
)

fini(
args.session_name,
)
init_args = {}
init_args['session_name'] = args.session_name
init_args['base_path'] = args.path
init_args['ros_events'] = events_ust
init_args['kernel_events'] = events_kernel
# Note: key name of context_fields differs in galactic and humble,
if os.environ['ROS_DISTRO'] == 'galactic':
init_args['context_names'] = context_fields
else:
init_args['context_fields'] = context_fields
init_args['display_list'] = args.list

init(**init_args)
fini(session_name=args.session_name)

return 0