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

Andreas Tille tille at alioth.debian.org
Mon May 7 21:55:41 UTC 2012


Author: tille
Date: 2012-05-07 21:55:40 +0000 (Mon, 07 May 2012)
New Revision: 2281

Modified:
   udd/udd/bibref_gatherer.py
Log:
Print warning messages if authors fiels contains more ',' strings than ' and '


Modified: udd/udd/bibref_gatherer.py
===================================================================
--- udd/udd/bibref_gatherer.py	2012-05-07 21:25:14 UTC (rev 2280)
+++ udd/udd/bibref_gatherer.py	2012-05-07 21:55:40 UTC (rev 2281)
@@ -134,6 +134,8 @@
           if new_author != ref['value']:
             self.log.warning("Author of source package %s does contain invalid BibTeX format: %s will be turned into %s", source, ref['value'], new_author)
             ref['value'] = new_author
+          if ref['value'].count(',') > ref['value'].count(' and ') + 1:
+            self.log.warning("Suspicious authors field in source package %s with way more ',' than ' and ' strings: %s", source, ref['value'])
       self.bibrefs.append(ref)
       if r.lower() == 'year':
         year = ref['value']




More information about the Collab-qa-commits mailing list