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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Jan 17 10:27:05 CET 2011


Revision: 12971
          http://gar.svn.sourceforge.net/gar/?rev=12971&view=rev
Author:   wahwah
Date:     2011-01-17 09:27:05 +0000 (Mon, 17 Jan 2011)

Log Message:
-----------
checkpkg: Unused override display fix

Adding a specific __unicode__ function to CheckpkgOverride in models.py.

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

Modified: csw/mgar/gar/v2/lib/python/checkpkg2.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg2.py	2011-01-17 09:26:44 UTC (rev 12970)
+++ csw/mgar/gar/v2/lib/python/checkpkg2.py	2011-01-17 09:27:05 UTC (rev 12971)
@@ -163,7 +163,7 @@
       if unapplied_overrides:
         print textwrap.fill(UNAPPLIED_OVERRIDES, 80)
         for override in unapplied_overrides:
-          print "* Unused %s" % override
+          print u"* Unused %s" % override
   exit_code = bool(tags_for_all_osrels)
   sys.exit(exit_code)
 

Modified: csw/mgar/gar/v2/lib/python/models.py
===================================================================
--- csw/mgar/gar/v2/lib/python/models.py	2011-01-17 09:26:44 UTC (rev 12970)
+++ csw/mgar/gar/v2/lib/python/models.py	2011-01-17 09:27:05 UTC (rev 12971)
@@ -222,6 +222,12 @@
   tag_name = sqlobject.UnicodeCol(notNone=True)
   tag_info = sqlobject.UnicodeCol(default=None)
 
+  def __unicode__(self):
+    return (u"Override: %s: %s %s" %
+            (self.pkgname,
+             self.tag_name,
+             self.tag_info or ""))
+
   def DoesApply(self, tag):
     """Figures out if this override applies to the given tag."""
     basket_a = {}


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