#NEWLINE# @ classmethod #NEWLINE# def from_int( cls , retries , redirect = True , default = None ) : #NEWLINE# #INDENT# ' Backwards-compatibility for the old retries format.' #NEWLINE# if ( retries is None ) : #NEWLINE# #INDENT# retries = ( default if ( default is not None ) else cls . DEFAULT ) #NEWLINE# #UNINDENT# if isinstance ( retries , Retry ) : #NEWLINE# #INDENT# return retries #NEWLINE# #UNINDENT# redirect = ( bool ( redirect ) and None ) #NEWLINE# new_retries = cls ( retries , redirect = redirect ) #NEWLINE# log . debug ( ( 'Converted retries value: %r -> %r' % ( retries , new_retries ) ) ) #NEWLINE# return new_retries