Skip to content

Commit

Permalink
uorb_rtps_classifier: add the capability to receive absolute and rela…
Browse files Browse the repository at this point in the history
…tive paths
  • Loading branch information
TSC21 committed Jan 27, 2019
1 parent c3c9801 commit 592c23f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions msg/tools/uorb_rtps_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,13 @@ def parse_yaml_msg_id_file(yaml_file):
# Parse arguments
args = parser.parse_args()

msg_folder = args.msgdir
msg_dir = args.msgdir
if args.msgdir == 'msg':
msg_folder = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if args.yaml_file != 'tools/uorb_rtps_message_ids.yaml':
classifier = Classifier(os.path.abspath(args.yaml_file), msg_folder)
msg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
else:
classifier = Classifier(os.path.join(
msg_folder, args.yaml_file), msg_folder)
msg_dir = os.path.abspath(args.msgdir)
classifier = (Classifier(os.path.abspath(args.yaml_file), msg_dir) if os.path.isabs(args.yaml_file) \
else Classifier(os.path.join(msg_dir, args.yaml_file), msg_dir))

if args.send:
if args.path:
Expand Down

0 comments on commit 592c23f

Please sign in to comment.