Come to think of it, it might better live in the amazonproduct.contrib package as subclass of API.
I'm thinking of something along the lines of:
classRetryAPI(API):#: Max number of tries before giving upTRIES=5#: Delay between tries in secondsDELAY=3#: Between each try the delay will be lengthed by this backoff multiplierBACKOFF=1def_fetch(self,url):""" Retrieves XML response from Amazon. In case of a timeout, it will try :const:`~RetryAPI.TRIES`` times before raising an error. """attempts=0delay=self.DELAYwhileTrue:try:attempts+=1returnAPI._fetch(self,url)excepturllib2.URLError,e:# if a timeout occurred# wait for some time before trying againreason=getattr(e,'reason',None)ifisinstance(reason,socket.timeout)andattempts<self.TRIES:time.sleep(delay)delay*=self.BACKOFFcontinue# otherwise reraise the original errorraise