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

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


Revision: 21075
          http://gar.svn.sourceforge.net/gar/?rev=21075&view=rev
Author:   wahwah
Date:     2013-05-14 16:45:17 +0000 (Tue, 14 May 2013)
Log Message:
-----------
pkgdb: Retry failed calls to catalog data.

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	2013-05-14 16:45:07 UTC (rev 21074)
+++ csw/mgar/gar/v2/lib/python/rest.py	2013-05-14 16:45:17 UTC (rev 21075)
@@ -9,6 +9,7 @@
 import pycurl
 import re
 import urllib2
+import httplib
 
 import retry_decorator
 
@@ -76,6 +77,7 @@
         # Other HTTP errors are should be thrown.
         raise
 
+  @retry_decorator.Retry(tries=4, exceptions=(RestCommunicationError, httplib.BadStatusLine))
   def GetCatalogData(self, md5_sum):
     self.ValidateMd5(md5_sum)
     url = self.rest_url + self.PKGDB_APP + "/srv4/%s/catalog-data/" % md5_sum

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