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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Mar 1 19:49:55 CET 2014


Revision: 23097
          http://sourceforge.net/p/gar/code/23097
Author:   wahwah
Date:     2014-03-01 18:49:55 +0000 (Sat, 01 Mar 2014)
Log Message:
-----------
checkpkg: Retry GetPkgByMd5

Apache/HTTP can be flaky, so retry HTTP requests in GetPkgByMd5.

(Failures have been observed on the buildfarm.)

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	2014-03-01 18:49:45 UTC (rev 23096)
+++ csw/mgar/gar/v2/lib/python/rest.py	2014-03-01 18:49:55 UTC (rev 23097)
@@ -48,6 +48,7 @@
     if not re.match(r'^[0-9a-f]{32}$', md5_sum):
       raise ArgumentError('Passed argument is not a valid md5 sum: %r' % md5_sum)
 
+  @retry_decorator.Retry(tries=DEFAULT_TRIES, exceptions=(RestCommunicationError, httplib.BadStatusLine))
   def GetPkgByMd5(self, md5_sum):
     self.ValidateMd5(md5_sum)
     url = self.pkgdb_url + "/srv4/%s/" % 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