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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue May 14 18:45:31 CEST 2013


Revision: 21076
          http://gar.svn.sourceforge.net/gar/?rev=21076&view=rev
Author:   wahwah
Date:     2013-05-14 16:45:30 +0000 (Tue, 14 May 2013)
Log Message:
-----------
pkgdb: Various cleanup

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

Modified: csw/mgar/gar/v2/lib/python/rest.py
===================================================================
--- csw/mgar/gar/v2/lib/python/rest.py	2013-05-14 16:45:17 UTC (rev 21075)
+++ csw/mgar/gar/v2/lib/python/rest.py	2013-05-14 16:45:30 UTC (rev 21076)
@@ -113,7 +113,7 @@
     try:
       data = urllib2.urlopen(url).read()
       return cjson.decode(data)
-    except urllib2.HTTPError, e:
+    except urllib2.HTTPError as e:
       logging.warning("%s -- %s", url, e)
       return None
 

Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py	2013-05-14 16:45:17 UTC (rev 21075)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py	2013-05-14 16:45:30 UTC (rev 21076)
@@ -39,7 +39,7 @@
 )
 urls_rest = (
   r'/rest/catalogs/', 'RestCatalogList',
-  r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/', 'Catalogs',
+  r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/', 'RestCatalogDetail',
   r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/pkgname-by-filename',
       'PkgnameByFilename',
   r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/pkgnames-and-paths-by-basename',
@@ -47,8 +47,10 @@
   r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/for-generation/',
       'CatalogForGeneration',
   # Query by catalog release, arch, OS release and catalogname
-  r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/catalognames/([^/]+)/', 'Srv4ByCatAndCatalogname',
-  r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/pkgnames/([^/]+)/', 'Srv4ByCatAndPkgname',
+  r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/catalognames/([^/]+)/',
+      'Srv4ByCatAndCatalogname',
+  r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/pkgnames/([^/]+)/',
+      'Srv4ByCatAndPkgname',
   r'/rest/maintainers/([0-9]+)/', 'RestMaintainerDetail',
   r'/rest/srv4/([0-9a-f]{32})/', 'RestSrv4Detail',
   r'/rest/srv4/([0-9a-f]{32})/files/', 'RestSrv4DetailFiles',
@@ -301,7 +303,7 @@
     return render.ErrorTagList(rows)
 
 
-class Catalogs(object):
+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)
@@ -476,6 +478,7 @@
     except sqlobject.dberrors.OperationalError, e:
       raise web.internalerror(e)
 
+
 class RestCatalogList(object):
   def GET(self):
     archs = models.Architecture.select()

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