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

Andreas Tille tille at alioth.debian.org
Mon Apr 2 07:09:46 UTC 2012


Author: tille
Date: 2012-04-02 07:09:46 +0000 (Mon, 02 Apr 2012)
New Revision: 2206

Modified:
   udd/udd/bibref_gatherer.py
Log:
Handle another type of parsing errors with incorrect syntax; suppress useless warnings


Modified: udd/udd/bibref_gatherer.py
===================================================================
--- udd/udd/bibref_gatherer.py	2012-04-01 15:54:39 UTC (rev 2205)
+++ udd/udd/bibref_gatherer.py	2012-04-02 07:09:46 UTC (rev 2206)
@@ -77,7 +77,8 @@
         else:
           defined_fields[key] = 1
       else:
-          self.log.warning("Unexpected key in source package '%s': %s", source, key)
+          if key not in ('rank', 'package', 'refid'): # ignore internal maintenance fields
+            self.log.warning("Unexpected key in source package '%s': %s", source, key)
           defined_fields[key] = 1
       ref={}
       ref['rank']    = rank
@@ -132,6 +133,9 @@
         except yaml.scanner.ScannerError, err:
           self.log.error("Syntax error in file %s: %s" % (ufile, str(err)))
           continue
+        except yaml.parser.ParserError, err:
+          self.log.error("Syntax error in file %s: %s" % (ufile, str(err)))
+          continue
         try:
           references=fields['Reference']
         except KeyError:




More information about the Collab-qa-commits mailing list