From 2759ab6d2ba845f74d0333a68eb9fd52ac76c0c9 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 7 Jul 2022 16:36:38 -0600 Subject: [PATCH] per #1691, replace whitespace with underscore in output paths --- metplus/wrappers/command_builder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metplus/wrappers/command_builder.py b/metplus/wrappers/command_builder.py index e41b51cf8c..4148725b14 100755 --- a/metplus/wrappers/command_builder.py +++ b/metplus/wrappers/command_builder.py @@ -968,6 +968,9 @@ def find_and_check_output_file(self, time_info=None, # replace wildcard character * with all output_path = output_path.replace('*', 'all') + # replace any whitespace with an underscore + output_path = '_'.join(output_path.split()) + skip_if_output_exists = self.c_dict.get('SKIP_IF_OUTPUT_EXISTS', False) # get directory that the output file will exist