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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Mar 27 16:49:36 CET 2010


Revision: 9401
          http://gar.svn.sourceforge.net/gar/?rev=9401&view=rev
Author:   wahwah
Date:     2010-03-27 15:49:35 +0000 (Sat, 27 Mar 2010)

Log Message:
-----------
mGAR v2: checkpkg, fixed a bug with a tag parameter containing colons.

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

Modified: csw/mgar/gar/v2/lib/python/checkpkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg.py	2010-03-27 15:38:41 UTC (rev 9400)
+++ csw/mgar/gar/v2/lib/python/checkpkg.py	2010-03-27 15:49:35 UTC (rev 9401)
@@ -833,7 +833,7 @@
   """
   level_1 = line.strip().split(":")
   if len(level_1) > 1:
-    data_1 = level_1[1]
+    data_1 = ":".join(level_1[1:])
     pkgname = level_1[0]
   else:
     data_1 = level_1[0]

Modified: csw/mgar/gar/v2/lib/python/checkpkg_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_test.py	2010-03-27 15:38:41 UTC (rev 9400)
+++ csw/mgar/gar/v2/lib/python/checkpkg_test.py	2010-03-27 15:49:35 UTC (rev 9401)
@@ -222,7 +222,12 @@
     self.assertEquals(("CSWfoo", "foo-tag", "foo-info1 foo-info2"),
                       checkpkg.ParseTagLine(line))
 
+  def testParseTagLine_WithUrl(self):
+    line = "CSWfoo: tag-with-an-url http://www.example.com/"
+    self.assertEquals(("CSWfoo", "tag-with-an-url", "http://www.example.com/"),
+                      checkpkg.ParseTagLine(line))
 
+
 class ParseOverrideLineUnitTest(unittest.TestCase):
   
   def setUp(self):


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