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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Sep 14 17:37:19 CEST 2013


Revision: 21925
          http://gar.svn.sourceforge.net/gar/?rev=21925&view=rev
Author:   wahwah
Date:     2013-09-14 15:37:19 +0000 (Sat, 14 Sep 2013)
Log Message:
-----------
cleanup

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

Modified: csw/mgar/gar/v2/lib/python/models.py
===================================================================
--- csw/mgar/gar/v2/lib/python/models.py	2013-09-14 15:37:02 UTC (rev 21924)
+++ csw/mgar/gar/v2/lib/python/models.py	2013-09-14 15:37:19 UTC (rev 21925)
@@ -515,7 +515,7 @@
        'version_string',
        'pkgname',
        'basename',
-       'srv4_file_stats.md5_sum',
+       'srv4_file_stats.md5_sum', # Hardcoded table name, is it portable?
        'size',
        'deps',
        'i_deps',

Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py	2013-09-14 15:37:02 UTC (rev 21924)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py	2013-09-14 15:37:19 UTC (rev 21925)
@@ -225,8 +225,7 @@
     sqo_osrel, sqo_arch, sqo_catrel = models.GetSqoTriad(
         osrel_name, arch_name, catrel_name)
     t2 = time.time()
-    pkgs = models.GetCatPackagesResult(sqo_osrel, sqo_arch, sqo_catrel)
-    pkgs = list(pkgs)
+    pkgs = list(models.GetCatPackagesResult(sqo_osrel, sqo_arch, sqo_catrel))
     t3 = time.time()
     timeinfo = "Query evaluation: %.2fs" % (t3-t2)
     return render.CatalogDetail(cat_name, pkgs, timeinfo, len(pkgs))
@@ -315,6 +314,7 @@
 
 
 class RestCatalogDetail(object):
+
   def GET(self, catrel_name, arch_name, osrel_name):
     sqo_osrel, sqo_arch, sqo_catrel = models.GetSqoTriad(
         osrel_name, arch_name, catrel_name)
@@ -339,7 +339,7 @@
     db_catalog = checkpkg_lib.Catalog()
     try:
       pkgs = db_catalog.GetPkgByPath(filename, osrel, arch, catrel)
-    except sqlobject.main.SQLObjectNotFound, e:
+    except sqlobject.main.SQLObjectNotFound:
       raise web.notfound()
     web.header('Content-type', 'application/x-vnd.opencsw.pkg;type=pkgname-list')
     web.header('X-Rest-Info', 'I could tell you about the format, but I won\'t')

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