1 |
robbat2 08/10/01 21:41:44 |
2 |
|
3 |
Modified: use_desc_gen.py |
4 |
Log: |
5 |
Issue warning if Unicode is seen. |
6 |
|
7 |
Revision Changes Path |
8 |
1.15 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.15&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?rev=1.15&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?r1=1.14&r2=1.15 |
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.14 |
18 |
retrieving revision 1.15 |
19 |
diff -p -w -b -B -u -u -r1.14 -r1.15 |
20 |
--- use_desc_gen.py 21 Sep 2008 19:10:43 -0000 1.14 |
21 |
+++ use_desc_gen.py 1 Oct 2008 21:41:43 -0000 1.15 |
22 |
@@ -79,8 +79,11 @@ def FindMetadataFiles(repo_path, categor |
23 |
metadata = GetLocalFlagInfoFromMetadataXml(f) |
24 |
pkg_split = pkg_path.split('/') |
25 |
for k, v in metadata.iteritems(): |
26 |
+ try: |
27 |
output.write('%s/%s:%s - %s\n' % (pkg_split[-2] ,pkg_split[-1], k, v)) |
28 |
- |
29 |
+ except UnicodeEncodeError, e: |
30 |
+ logging.error('Unicode found in %s, not generating to output' % (pkg_path)) |
31 |
+ continue |
32 |
|
33 |
def _GetTextFromNode(node): |
34 |
"""Given an XML node, try to turn all it's children into text. |