[Blends-commit] [SCM] website branch, master, updated. db2cb0301db3ba6d021ac09f41ace6719643749f
Andreas Tille
tille at debian.org
Mon May 25 06:25:53 UTC 2015
The following commit has been merged in the master branch:
commit db2cb0301db3ba6d021ac09f41ace6719643749f
Author: Akshita Jha <Akshita Jha>
Date: Sun May 24 23:36:51 2015 +0530
Modify blendstasktools.py: Fix UnicodeEncode errors in debian-science and debian-pan
diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index b914bf8..9d31440 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -1217,6 +1217,13 @@ class TaskDependencies:
except:
pass
+ # Solves UnicodeEncodeError because of characters present in the title of
+ # dependencies in blends debian-science, debian-pan
+ try:
+ dep.properties['published']['title'] = dep.properties['published']['title'].encode('ascii','xmlcharrefreplace')
+ except:
+ pass
+
# In general we can just add the dependency to the list
self.dependencies[dep.pkgstatus].append(dep)
return
@@ -1271,7 +1278,7 @@ class TaskDependencies:
why = stanza['why']
continue
if key == 'Responsible':
- responsible = stanza['responsible'].strip()
+ responsible = (stanza['responsible'].strip()).encode('utf-8')
if not dep:
# Make sure there is really enough information to deal with provided by the package
logger.error("Missing package information for field %s = %s in task file %s" % (key, responsible, self.task))
@@ -1288,6 +1295,7 @@ class TaskDependencies:
_name = to_unicode(_name)
try:
dep.responsible = '<a href="mailto:%s">%s</a>' % (_url, _name)
+ dep.responsible = dep.responsible.encode('utf-8')
except UnicodeDecodeError, err:
logger.error("Unicode problem when decoding name of maintainer with mail address <%s> in task %s (%s)" % (_url, self.task, err))
continue
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list