[csw-devel] SF.net SVN: gar:[11902] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Mon Dec 13 01:56:41 CET 2010
Revision: 11902
http://gar.svn.sourceforge.net/gar/?rev=11902&view=rev
Author: wahwah
Date: 2010-12-13 00:56:41 +0000 (Mon, 13 Dec 2010)
Log Message:
-----------
checkpkg: Override application bugfix
Moving the DoesApply function to models. It now works with the SQLObject type
of overrides.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/models.py
csw/mgar/gar/v2/lib/python/overrides.py
Modified: csw/mgar/gar/v2/lib/python/models.py
===================================================================
--- csw/mgar/gar/v2/lib/python/models.py 2010-12-13 00:56:05 UTC (rev 11901)
+++ csw/mgar/gar/v2/lib/python/models.py 2010-12-13 00:56:41 UTC (rev 11902)
@@ -198,6 +198,21 @@
tag_name = sqlobject.UnicodeCol(notNone=True)
tag_info = sqlobject.UnicodeCol(default=None)
+ def DoesApply(self, tag):
+ """Figures out if this override applies to the given tag."""
+ basket_a = {}
+ basket_b = {}
+ if self.pkgname:
+ basket_a["pkgname"] = self.pkgname
+ basket_b["pkgname"] = tag.pkgname
+ if self.tag_info:
+ basket_a["tag_info"] = self.tag_info
+ basket_b["tag_info"] = tag.tag_info
+ basket_a["tag_name"] = self.tag_name
+ basket_b["tag_name"] = tag.tag_name
+ return basket_a == basket_b
+
+
class Srv4FileInCatalog(sqlobject.SQLObject):
"""Assignment of a particular srv4 file to a specific catalog.
Modified: csw/mgar/gar/v2/lib/python/overrides.py
===================================================================
--- csw/mgar/gar/v2/lib/python/overrides.py 2010-12-13 00:56:05 UTC (rev 11901)
+++ csw/mgar/gar/v2/lib/python/overrides.py 2010-12-13 00:56:41 UTC (rev 11902)
@@ -38,21 +38,7 @@
return (u"Override(%s, %s, %s)"
% (repr(self.pkgname), repr(self.tag_name), repr(self.tag_info)))
- def DoesApply(self, tag):
- """Figures out if this override applies to the given tag."""
- basket_a = {}
- basket_b = {}
- if self.pkgname:
- basket_a["pkgname"] = self.pkgname
- basket_b["pkgname"] = tag.pkgname
- if self.tag_info:
- basket_a["tag_info"] = self.tag_info
- basket_b["tag_info"] = tag.tag_info
- basket_a["tag_name"] = self.tag_name
- basket_b["tag_name"] = tag.tag_name
- return basket_a == basket_b
-
def ApplyOverrides(error_tags, override_list):
"""Filters out all the error tags that overrides apply to.
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