[csw-devel] SF.net SVN: gar:[9144] csw/mgar/gar/v2/lib/python/checkpkg.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Mar 13 20:30:49 CET 2010


Revision: 9144
          http://gar.svn.sourceforge.net/gar/?rev=9144&view=rev
Author:   wahwah
Date:     2010-03-13 19:30:49 +0000 (Sat, 13 Mar 2010)

Log Message:
-----------
mGAR v2: moving SetErrorsToDict to the base class of checkpkg managers. http://lists.opencsw.org/pipermail/maintainers/2010-March/011579.html

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/checkpkg.py

Modified: csw/mgar/gar/v2/lib/python/checkpkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg.py	2010-03-13 19:00:51 UTC (rev 9143)
+++ csw/mgar/gar/v2/lib/python/checkpkg.py	2010-03-13 19:30:49 UTC (rev 9144)
@@ -750,6 +750,21 @@
     tags_report = unicode(tags_report_t)
     return screen_report, tags_report
 
+  def SetErrorsToDict(self, set_errors, a_dict):
+    # These were generated by a set, but are likely to be bound to specific
+    # packages. We'll try to preserve the package assignments.
+    errors = copy.copy(a_dict)
+    for tag in set_errors:
+      if tag.pkgname:
+        if not tag.pkgname in errors:
+          errors[tag.pkgname] = []
+        errors[tag.pkgname].append(tag)
+      else:
+        if "package-set" not in errors:
+          errors["package-set"] = []
+        errors["package-set"].append(error)
+    return a_dict
+
   def Run(self):
     """Runs all the checks
 
@@ -773,21 +788,6 @@
   def RegisterSetCheck(self, function):
     self.set_checks.append(function)
 
-  def SetErrorsToDict(self, set_errors, a_dict):
-    # These were generated by a set, but are likely to be bound to specific
-    # packages. We'll try to preserve the package assignments.
-    errors = copy.copy(a_dict)
-    for tag in set_errors:
-      if tag.pkgname:
-        if not tag.pkgname in errors:
-          errors[tag.pkgname] = []
-        errors[tag.pkgname].append(tag)
-      else:
-        if "package-set" not in errors:
-          errors["package-set"] = []
-        errors["package-set"].append(error)
-    return a_dict
-
   def GetAllTags(self, packages_data):
     errors = {}
     for pkg_data in packages_data:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list