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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue Feb 15 09:57:21 CET 2011


Revision: 13318
          http://gar.svn.sourceforge.net/gar/?rev=13318&view=rev
Author:   wahwah
Date:     2011-02-15 08:57:20 +0000 (Tue, 15 Feb 2011)

Log Message:
-----------
pkgdb: More informative warnings from RestClient

When warning about a HTTP error, display the URL.

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

Modified: csw/mgar/gar/v2/lib/python/rest.py
===================================================================
--- csw/mgar/gar/v2/lib/python/rest.py	2011-02-15 08:22:56 UTC (rev 13317)
+++ csw/mgar/gar/v2/lib/python/rest.py	2011-02-15 08:57:20 UTC (rev 13318)
@@ -24,7 +24,7 @@
       data = urllib2.urlopen(url).read()
       return json.loads(data)
     except urllib2.HTTPError, e:
-      logging.warning(e)
+      logging.warning("%s -- %s", url, e)
       return {
           "maintainer_email": "Unknown",
       }
@@ -44,7 +44,7 @@
       data = urllib2.urlopen(url).read()
       return json.loads(data)
     except urllib2.HTTPError, e:
-      logging.warning(e)
+      logging.warning("%s -- %s", url, e)
       return None
 
   def Srv4ByCatalogAndCatalogname(self, catrel, arch, osrel, catalogname):
@@ -57,5 +57,5 @@
       data = urllib2.urlopen(url).read()
       return json.loads(data)
     except urllib2.HTTPError, e:
-      logging.warning(e)
+      logging.warning("%s -- %s", url, e)
       return None


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