[Blends-commit] r3141 - /blends/trunk/webtools/blendstasktools.py
tille at users.alioth.debian.org
tille at users.alioth.debian.org
Fri Feb 17 21:10:45 UTC 2012
Author: tille
Date: Fri Feb 17 21:10:44 2012
New Revision: 3141
URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3141
Log:
Use bibliographic information which was injected into UDD via debian/upstream files
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=3141&op=diff
==============================================================================
--- blends/trunk/webtools/blendstasktools.py (original)
+++ blends/trunk/webtools/blendstasktools.py Fri Feb 17 21:10:44 2012
@@ -656,7 +656,10 @@
ret += ", %s: %s" % (prop, to_unicode(str(self.properties[prop])))
except UnicodeEncodeError:
ret += ", %s: <UnicodeEncodeError>" % (prop)
- ret += ", popcon = %i (%i)" % (self.popcon['vote'], self.popcon['recent'])
+ try:
+ ret += ", popcon = %i (%i)" % (self.popcon['vote'], self.popcon['recent'])
+ except:
+ pass
ret += ", debtags = " + str(self.debtags)
if self.icon:
ret += ", screenshoticon = " + self.icon
@@ -762,11 +765,12 @@
self.tasks[task] = td
if source == 0:
- # overall popcon submissions
+ # total number popcon submissions
query = "EXECUTE popcon_submissions"
_execute_udd_query(query)
if curs.rowcount > 0:
self.popconsubmit = curs.fetchone()[0]
+ # Obtain packages that might enhance any of the packages in tasks list
self.LinkEnhances()
def GetNamesOnlyDict(self, dependencystatus=[]):
@@ -967,7 +971,7 @@
logger.error("No such task file %s." % self.taskfile)
return None
- # Dictionary with satus of dependencies as key and list of DependantPackage
+ # Dictionary with status of dependencies as key and list of DependantPackage
# instances
self.dependencies = {}
for pkgstat in pkgstatus:
@@ -1465,6 +1469,16 @@
# package versions in all releases
dep.properties['pkg-url'] = PKGURLMASK % dep.pkg
+ for pub in ("Published-Year", "Published-Title", "Published-Authors", "Published-DOI", "Published-PubMed"):
+ try:
+ if row[pub]:
+ if not dep.properties.has_key('published'):
+ dep.properties['published'] = {}
+ ptype = pub.replace('Published-','').lower()
+ dep.properties['published'][ptype] = to_unicode(row[pub])
+ except:
+ pass # if publication information is not yet queried
+
for l in languages:
if row['description_'+l]:
dep.desc[l] = {}
More information about the Blends-commit
mailing list