Skip to content
Snippets Groups Projects
Commit 78130574 authored by TSC21's avatar TSC21 Committed by Beat Küng
Browse files

uorb_rtps_classifier: add the capability to receive absolute and relative paths

parent 8da1ff4c
No related branches found
No related tags found
No related merge requests found
......@@ -123,14 +123,13 @@ if __name__ == "__main__":
# 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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment