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

Andreas Tille tille at alioth.debian.org
Mon May 21 12:49:03 UTC 2012


Author: tille
Date: 2012-05-21 12:49:03 +0000 (Mon, 21 May 2012)
New Revision: 2345

Modified:
   udd/udd/blends_prospective_gatherer.py
Log:
Work around old version of python-debian that is unable to handle comments properly


Modified: udd/udd/blends_prospective_gatherer.py
===================================================================
--- udd/udd/blends_prospective_gatherer.py	2012-05-21 12:29:56 UTC (rev 2344)
+++ udd/udd/blends_prospective_gatherer.py	2012-05-21 12:49:03 UTC (rev 2345)
@@ -321,6 +321,7 @@
                   self.log.debug("Control file for source '%s' of %s is lacking %s field" % (source, sprosp['blend'], prop))
 
             pkg = ictrl.next()
+            valid_pkg_info = True
             while pkg:
               pprosp = {}
               for sprop in sprosp.keys():
@@ -340,11 +341,14 @@
                   if pprosp.has_key('package'):
                     self.log.warning("Control file for source '%s' of %s has no desription for Package %s" % (source, sprosp['blend'], pprosp['package']))
                   else:
-                    self.log.error("Control file for source '%s' of %s seems to miss package information" % (source, sprosp['blend']))
-              # print pprosp
-              pkgs.append(pprosp)
+                    # self.log.error("Control file for source '%s' of %s seems to miss package information" % (source, sprosp['blend']))
+                    self.log.info("Control file for source '%s' of %s seems to contain some comments which can not be parsed/ignored with this python-debian version" % (source, sprosp['blend']))
+                    valid_pkg_info = False
+              if valid_pkg_info:
+                pkgs.append(pprosp)
               try:
                 pkg = ictrl.next()
+                valid_pkg_info = True
               except:
                 break
     	# Try to read debian/control




More information about the Collab-qa-commits mailing list