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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Aug 22 09:46:08 CEST 2011


Revision: 15399
          http://gar.svn.sourceforge.net/gar/?rev=15399&view=rev
Author:   wahwah
Date:     2011-08-22 07:46:07 +0000 (Mon, 22 Aug 2011)

Log Message:
-----------
csw-upload-pkg: a bugfix for package uploads

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

Modified: csw/mgar/gar/v2/lib/python/checkpkg_lib.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2011-08-21 12:55:24 UTC (rev 15398)
+++ csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2011-08-22 07:46:07 UTC (rev 15399)
@@ -995,21 +995,19 @@
       sqo_srv4, pkgname,
       sqo_osrel, sqo_arch, sqo_catrel):
     join = [
-          m.Srv4FileStats,
-          m.Pkginst.q.id==m.Srv4FileStats.q.pkginst,
         sqlbuilder.INNERJOINOn(None,
-          m.Srv4FileInCatalog,
-          m.Srv4FileStats.q.id==m.Srv4FileInCatalog.q.srv4file),
+          m.Pkginst,
+          m.Srv4FileStats.q.pkginst==m.Pkginst.q.id),
     ]
     res = m.Srv4FileStats.select(
-            m.Pkginst.q.pkgname==pkgname
+            m.Pkginst.q.pkgname==pkgname,
+            join=join
             ).throughTo.in_catalogs.filter(
                 sqlobject.AND(
                   m.Srv4FileInCatalog.q.osrel==sqo_osrel,
                   m.Srv4FileInCatalog.q.arch==sqo_arch,
                   m.Srv4FileInCatalog.q.catrel==sqo_catrel,
-                  m.Srv4FileInCatalog.q.srv4file!=sqo_srv4),
-            join=join)
+                  m.Srv4FileInCatalog.q.srv4file!=sqo_srv4))
     return res
 
   def AddSrv4ToCatalog(self, sqo_srv4, osrel, arch, catrel):

Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-08-21 12:55:24 UTC (rev 15398)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-08-22 07:46:07 UTC (rev 15399)
@@ -367,7 +367,7 @@
     #   logging.debug("*** Headers")
     #   logging.debug(h.getvalue())
     #   logging.debug("*** Data")
-    if http_code >= 400 and http_code <= 499:
+    if http_code >= 400 and http_code <= 599:
       if not self.debug:
         # In debug mode, all headers are printed to screen, and we aren't
         # interested in the response body.


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