fixed bug that caused the value of the reporting_params attribute to become corrupt.
Fixes : Bug 2812 - la mise à jour de physix-master a échoué (parsing de qconf -sconf global)
This commit is contained in:
parent
347a0c034b
commit
23fa150cbe
|
@ -121,6 +121,13 @@ class SgeConfig:
|
||||||
# only a single value is allowed for configuration attribute "administrator_mail"
|
# only a single value is allowed for configuration attribute "administrator_mail"
|
||||||
|
|
||||||
cleaned_value = re.sub(',\s*', ',', v)
|
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)
|
strResult += "%s %s\n" % (k, cleaned_value)
|
||||||
# print("strResult=%s" % strResult)
|
# print("strResult=%s" % strResult)
|
||||||
return strResult
|
return strResult
|
||||||
|
|
Loading…
Reference in New Issue