Skip to content

Commit 222ffc7

Browse files
improve readability for accessing the log_file_name
Co-authored-by: Katherine Scott <[email protected]> Signed-off-by: Tanishq Chaudhary <[email protected]>
1 parent 963b93e commit 222ffc7

File tree

1 file changed

+3
-1
lines changed
  • ros2launch/ros2launch/api

1 file changed

+3
-1
lines changed

ros2launch/ros2launch/api/api.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ def launch_a_launch_file(
159159
if args and args.launch_prefix_filter:
160160
launch_file_arguments.append(f'launch-prefix-filter:={args.launch_prefix_filter}')
161161

162-
log_file_name = args.log_file_name if args and args.log_file_name else 'launch'
162+
log_file_name = 'launch'
163+
if args and args.log_file_name:
164+
log_file_name = args.log_file_name
163165
launch_service = launch.LaunchService(
164166
argv=launch_file_arguments,
165167
noninteractive=noninteractive,

0 commit comments

Comments
 (0)