[Blends-commit] r3244 - /blends/trunk/webtools/blendstasktools.py
tille at users.alioth.debian.org
tille at users.alioth.debian.org
Mon Apr 2 07:22:11 UTC 2012
Author: tille
Date: Mon Apr 2 07:22:10 2012
New Revision: 3244
URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3244
Log:
Do not fail completely because of encoding problems in the data deduplictaion output
Modified:
blends/trunk/webtools/blendstasktools.py
Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=3244&op=diff
==============================================================================
--- blends/trunk/webtools/blendstasktools.py (original)
+++ blends/trunk/webtools/blendstasktools.py Mon Apr 2 07:22:10 2012
@@ -1489,13 +1489,16 @@
dep.properties['published'] = {}
if dep.properties['published'].has_key(pub):
if dep.properties['published'][pub] == to_unicode(row[pub]):
- print >>rmpub, "%s: %s: Published-%s: %s" % (dep.taskname, dep.pkg, pub, to_unicode(row[pub]))
+ try:
+ print >>rmpub, "%s: %s: Published-%s: %s" % (dep.taskname, dep.pkg, pub, to_unicode(row[pub]))
+ except UnicodeEncodeError:
+ print >>rmpub, "--- %s: %s: Published-%s: some duplicated value featuring encoding problems ---" % (dep.taskname, dep.pkg, pub)
logger.info("%s/%s: Publication-%s = %s can be removed" % (dep.taskname, dep.pkg, pub, to_unicode(row[pub])))
else:
logger.info("%s conflicting fields Publication-%s in tasks file with value '%s' and in UDD with value '%s'" % (dep.pkg, pub, dep.properties['published'][pub], to_unicode(row[pub])))
dep.properties['published'][pub] = to_unicode(row[pub])
- if dep.properties.has_key('published'):
- print "DEBUG", dep.pkg, dep.properties['published']
+ # if dep.properties.has_key('published'):
+ # print "DEBUG", dep.pkg, dep.properties['published']
for l in languages:
if row['description_'+l]:
dep.desc[l] = {}
More information about the Blends-commit
mailing list