From: | "Alec Warner (antarus)" <antarus@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo commit in users/antarus/projects/infra: use_desc_gen.py |
Date: | Thu, 07 Aug 2008 06:38:04 |
Message-Id: | E1KQz8L-0007K8-Tb@stork.gentoo.org |
1 | antarus 08/08/07 06:38:01 |
2 | |
3 | Modified: use_desc_gen.py |
4 | Log: |
5 | add whitespace patch per bug 233816. Thanks to ulm@g.o for the patch |
6 | |
7 | Revision Changes Path |
8 | 1.7 users/antarus/projects/infra/use_desc_gen.py |
9 | |
10 | file : http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?rev=1.7&view=markup |
11 | plain: http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?rev=1.7&content-type=text/plain |
12 | diff : http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?r1=1.6&r2=1.7 |
13 | |
14 | Index: use_desc_gen.py |
15 | =================================================================== |
16 | RCS file: /var/cvsroot/gentoo/users/antarus/projects/infra/use_desc_gen.py,v |
17 | retrieving revision 1.6 |
18 | retrieving revision 1.7 |
19 | diff -u -r1.6 -r1.7 |
20 | --- use_desc_gen.py 4 Aug 2008 19:29:25 -0000 1.6 |
21 | +++ use_desc_gen.py 7 Aug 2008 06:38:01 -0000 1.7 |
22 | @@ -21,6 +21,7 @@ |
23 | import logging |
24 | import optparse |
25 | import os |
26 | +import re |
27 | import sys |
28 | |
29 | from xml.dom import minidom |
30 | @@ -93,8 +94,8 @@ |
31 | children = 0 |
32 | data = node.nodeValue |
33 | |
34 | - data = data.replace("\t", '') |
35 | - data = data.replace("\n", '') |
36 | + whitespace = re.compile('\s+') |
37 | + data = whitespace.sub(' ', data) |
38 | return (data.strip(), children) |
39 | else: |
40 | desc = '' |