--- a/OptionsParsing.py Thu Nov 12 13:50:22 2020 +0100
+++ b/OptionsParsing.py Fri Nov 13 10:45:29 2020 +0100
@@ -37,16 +37,17 @@
if opts.min is not None or opts.max is not None:
- options += ' min="' + str(opts.min if opts.min is not None else 0) + '"'
- options += ' max="' + str(opts.max if opts.min is not None else 0) + '"'
+ options += ' min=' + str(opts.min if opts.min is not None else 0) + options += ' max=' + str(opts.max if opts.min is not None else 0) - options += ' precision="' + str(opts.precision) + '"'
+ options += ' precision=' + str(opts.precision) for name in ['subgroup', 'unit', 'other', 'tags']:
- options += ' ' + name + '="' + content + '"'
+ quoting = '"' if ' ' in content else '' + options += ' ' + name + '=' + quoting + content + quoting @@ -58,11 +59,6 @@
for key,dblquote_value,smpl_value in options:
- # sometime there is a dblquote at the end only of the value
- # because of old bug in previous version, fix for backward compatibility
- if len(smpl_value) > 0 and smpl_value[-1] == '"':
- smpl_value = smpl_value[:-1]
value = dblquote_value+smpl_value