From 4e445be8e392ceacc64173546a7ce0459019ffa5 Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Tue, 30 Aug 2022 06:27:33 -0700 Subject: [PATCH] sort node list and file list --- tools/roslaunch/src/roslaunch/node_args.py | 2 +- tools/roslaunch/src/roslaunch/rlutil.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/roslaunch/src/roslaunch/node_args.py b/tools/roslaunch/src/roslaunch/node_args.py index 09c6dc93d3..6da75aaf5c 100644 --- a/tools/roslaunch/src/roslaunch/node_args.py +++ b/tools/roslaunch/src/roslaunch/node_args.py @@ -87,7 +87,7 @@ def print_node_list(roslaunch_files): loader = roslaunch.xmlloader.XmlLoader(resolve_anon=False) config = load_config_default(roslaunch_files, None, loader=loader, verbose=False, assign_machines=False) node_list = get_node_list(config) - print('\n'.join(node_list)) + print('\n'.join(sorted(node_list))) except RLException as e: print(str(e), file=sys.stderr) sys.exit(1) diff --git a/tools/roslaunch/src/roslaunch/rlutil.py b/tools/roslaunch/src/roslaunch/rlutil.py index 95dbcbf101..36070dfb4f 100644 --- a/tools/roslaunch/src/roslaunch/rlutil.py +++ b/tools/roslaunch/src/roslaunch/rlutil.py @@ -264,7 +264,7 @@ def print_file_list(roslaunch_files): loader = roslaunch.xmlloader.XmlLoader(resolve_anon=True) config = load_config_default(roslaunch_files, None, loader=loader, verbose=False, assign_machines=False) files = [os.path.abspath(x) for x in set(config.roslaunch_files) - set([get_roscore_filename()])] - print('\n'.join(files)) + print('\n'.join(sorted(files))) except roslaunch.core.RLException as e: print(str(e), file=sys.stderr) sys.exit(1)