[Collab-qa-commits] r2227 - udd/udd

Andreas Tille tille at alioth.debian.org
Thu Apr 19 06:02:20 UTC 2012


Author: tille
Date: 2012-04-19 06:02:19 +0000 (Thu, 19 Apr 2012)
New Revision: 2227

Modified:
   udd/udd/bibref_gatherer.py
Log:
Do not warn about perfectly valid keys in debian/upstream                                                 


Modified: udd/udd/bibref_gatherer.py
===================================================================
--- udd/udd/bibref_gatherer.py	2012-04-19 05:51:36 UTC (rev 2226)
+++ udd/udd/bibref_gatherer.py	2012-04-19 06:02:19 UTC (rev 2227)
@@ -19,6 +19,8 @@
 def get_gatherer(connection, config, source):
   return bibref_gatherer(connection, config, source)
 
+other_known_keys = ('Archive', 'Contact', 'CRAN', 'Donation', 'Download', 'Help', 'Homepage', 'Name', 'Watch', 'Webservice')
+
 class bibref_gatherer(gatherer):
   """
   Bibliographic references from debian/upstream files
@@ -142,7 +144,12 @@
         try:
           references=fields['Reference']
         except KeyError:
-          self.log.warning("No references found for source package %s (Keys: %s)" % (source, str(fields.keys())))
+          warn_keys = []
+          for key in fields.keys():
+            if key not in other_known_keys:
+              warn_keys.append(key)
+          if len(warn_keys) > 0:
+            self.log.warning("No references found for source package %s (Keys: %s)" % (source, str(warn_keys)))
           continue
         except TypeError:
           self.log.warning("debian/upstream file of source package %s does not seem to be a YAML file" % (source))




More information about the Collab-qa-commits mailing list