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

Update topic_tools relay_field to Python 3 #2253

Open
wants to merge 2 commits into
base: noetic-devel
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions tools/topic_tools/scripts/relay_field
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Example:
frame_id: m.data"
"""

from __future__ import print_function
import argparse
import sys
import copy
Expand All @@ -38,7 +37,7 @@ def _eval_in_dict_impl(dict_, globals_, locals_):
type_ = type(v)
if type_ is dict:
res[k] = _eval_in_dict_impl(v, globals_, locals_)
elif (type_ is str) or (type_ is unicode):
elif (type_ is str) or (type_ is bytes):
try:
res[k] = eval(v, globals_, locals_)
except NameError:
Expand Down