From 23fa150cbea05ce59339b13bbce66e86f5340023 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Thu, 5 Mar 2020 10:50:50 +0000 Subject: [PATCH] fixed bug that caused the value of the reporting_params attribute to become corrupt. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes : Bug 2812 - la mise à jour de physix-master a échoué (parsing de qconf -sconf global) --- SunGridEngine/SgeConfig.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SunGridEngine/SgeConfig.py b/SunGridEngine/SgeConfig.py index fcf350b..2647efc 100755 --- a/SunGridEngine/SgeConfig.py +++ b/SunGridEngine/SgeConfig.py @@ -121,6 +121,13 @@ class SgeConfig: # only a single value is allowed for configuration attribute "administrator_mail" cleaned_value = re.sub(',\s*', ',', v) + + # prevent space pollution in space separated values, such as in reporting_params (see https://bugzilla.ipr.univ-rennes1.fr/show_bug.cgi?id=2812). If spaces are not compacted, the space separated values will contain more and more spaces and at some point corrupt the value : a line containing just a backslash, such as in the following example: + # reporting_params accounting=true reporting=false \ + # flush_time=00:00:15 joblog=false \ + # sharelog=00:00:00 + # \ + cleaned_value = re.sub('\s+', ' ', cleaned_value) strResult += "%s %s\n" % (k, cleaned_value) # print("strResult=%s" % strResult) return strResult