The following commit has been merged in the master branch:
commit 4a11dea732797c30ad9e68aa60d5fe7c21f45c6a
Author: Akshita Jha <[email protected]>
Date: Sun Mar 22 01:54:03 2015 +0530
Modify blendstasktools.py to solve the UnicodeError in tasks.py The error
was due to characters present in the 'long description' of some dependencies in
the 'unofficial' and 'prospective' packages. Also, there were some 'authors'
names in the dependencies of 'wnpp' package that had the same issue. I wrote a
try-except block in blendstasktools.py which encodes these characters for
'xhtml' rendering.
diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index c58ef80..4d288f6 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -1201,6 +1201,21 @@ class TaskDependencies:
if dep.dep_strength == 'Ignore' or dep.dep_strength == 'Avoid':
return
if source != 1:
+
+ # Solves UnicodeEncodeError because of characters present in the
+ # long description of the dependecies in 'unoficial','prospective'
packages
+ try:
+ dep.desc['en']['long'] =
dep.desc['en']['long'].encode('ascii','xmlcharrefreplace')
+ except:
+ pass
+
+ # Solves UnicodeEncodeError because of characters present in the
+ # authors name of the dependencies in 'wnpp' packages
+ try:
+ dep.properties['published']['authors'] =
dep.properties['published']['authors'].encode('ascii','xmlcharrefreplace')
+ except:
+ pass
+
# In general we can just add the dependency to the list
self.dependencies[dep.pkgstatus].append(dep)
return
--
Static and dynamic websites for Debian Pure Blends
_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit