summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-10-01 21:41:43 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-10-01 21:41:43 +0000
commitefc81bd2c8550fe8848523bb9e2f317044b7eaa2 (patch)
tree69887d0d6a77ef2f43e941365f49145db26fe30d /users
parentInitial import, English revision 1.9; Translation by Michael Münch, thanks! (diff)
downloadgentoo-efc81bd2c8550fe8848523bb9e2f317044b7eaa2.tar.gz
gentoo-efc81bd2c8550fe8848523bb9e2f317044b7eaa2.tar.bz2
gentoo-efc81bd2c8550fe8848523bb9e2f317044b7eaa2.zip
Issue warning if Unicode is seen.
Diffstat (limited to 'users')
-rw-r--r--users/antarus/projects/infra/use_desc_gen.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/users/antarus/projects/infra/use_desc_gen.py b/users/antarus/projects/infra/use_desc_gen.py
index bddc673dcf..b9af8fc660 100644
--- a/users/antarus/projects/infra/use_desc_gen.py
+++ b/users/antarus/projects/infra/use_desc_gen.py
@@ -79,8 +79,11 @@ def FindMetadataFiles(repo_path, category_path, output=sys.stdout):
metadata = GetLocalFlagInfoFromMetadataXml(f)
pkg_split = pkg_path.split('/')
for k, v in metadata.iteritems():
- output.write('%s/%s:%s - %s\n' % (pkg_split[-2] ,pkg_split[-1], k, v))
-
+ try:
+ output.write('%s/%s:%s - %s\n' % (pkg_split[-2] ,pkg_split[-1], k, v))
+ except UnicodeEncodeError, e:
+ logging.error('Unicode found in %s, not generating to output' % (pkg_path))
+ continue
def _GetTextFromNode(node):
"""Given an XML node, try to turn all it's children into text.