strip spaces before writing the files

Without stripping the spaces tools/validate.py will not accept
the generated XML files.

Change-Id: I67d58cdf602107be05c6152eb59e4c12a2c0afd4
This commit is contained in:
Christian Berendt 2013-08-13 10:59:24 +02:00
parent 7c4b4bd4a3
commit 67d5ef1ef6
1 changed files with 4 additions and 3 deletions

View File

@ -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")