summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2008-08-12 17:58:23 +0000
committerAlec Warner <antarus@gentoo.org>2008-08-12 17:58:23 +0000
commit7be711a13714fc684de6c3ff3c8981769be0e59c (patch)
tree35e2e8bc8a9b9e8c056e9bb77cdb5c2f42c80b83 /users/antarus
parentGLSA 200808-11 (diff)
downloadgentoo-7be711a13714fc684de6c3ff3c8981769be0e59c.tar.gz
gentoo-7be711a13714fc684de6c3ff3c8981769be0e59c.tar.bz2
gentoo-7be711a13714fc684de6c3ff3c8981769be0e59c.zip
Fix spacing bug, 233816
Diffstat (limited to 'users/antarus')
-rw-r--r--users/antarus/projects/infra/use_desc_gen.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/users/antarus/projects/infra/use_desc_gen.py b/users/antarus/projects/infra/use_desc_gen.py
index cfd2e695eb..5f3efe32d4 100644
--- a/users/antarus/projects/infra/use_desc_gen.py
+++ b/users/antarus/projects/infra/use_desc_gen.py
@@ -87,6 +87,9 @@ def _GetTextFromNode(node):
children are 'complex' nodes (often <pkg> nodes) that usually require a
trailing space to ensure sane output.
+ NOTE: The above comment is now bullocks as the regex handles spacing; I may
+ remove the 'children' crap in a future release but it works for now.
+
Strip out \n and \t as they are not valid in use.local.desc.
"""
@@ -96,18 +99,13 @@ def _GetTextFromNode(node):
whitespace = re.compile('\s+')
data = whitespace.sub(' ', data)
- return (data.strip(), children)
+ return (data, children)
else:
desc = ''
base_children = 1
for child in node.childNodes:
child_desc, children = _GetTextFromNode(child)
- child_desc.strip()
- logging.debug('Children: %s' % children)
- if children:
- desc += ' ' + child_desc
- else:
- desc += child_desc
+ desc += child_desc
return (desc, base_children)