From 67d5ef1ef6422211cb962ea32f6465b5f14043c7 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Tue, 13 Aug 2013 10:59:24 +0200 Subject: [PATCH] strip spaces before writing the files Without stripping the spaces tools/validate.py will not accept the generated XML files. Change-Id: I67d58cdf602107be05c6152eb59e4c12a2c0afd4 --- autogenerate-config-docs/common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autogenerate-config-docs/common.py b/autogenerate-config-docs/common.py index cbee3839..aa415fa4 100644 --- a/autogenerate-config-docs/common.py +++ b/autogenerate-config-docs/common.py @@ -3,6 +3,7 @@ # import os +import string import sys import pkgutil import glob @@ -207,9 +208,9 @@ def write_flags(filepath, flags, name_only=True, verbose=0): opt.help = "No help text available for this option" if not name_only: f.write("|") - f.write("||".join([name, - str(opt.default), - opt.help.replace("\n", " ")])) + f.write("||".join([string.strip(name), + string.strip(str(opt.default)), + string.strip(opt.help.replace("\n", " ")]))) f.write("\n|-\n") else: f.write(name + "\n")