[PATCH] Same-mirror retry on refused connections. Helps BZ 853432

Zdenek Pavlas zpavlas at redhat.com
Thu Oct 31 12:07:06 UTC 2013


>  Also we've now gone from:
> 
>    if e.errno == 12 or (getattr(e, 'code', 0) == 503):
>    # Do XYZ
> ...to:
> 
>    if e.errno == 12 or (e.errno == 14 and (getattr(e, 'code', 0) == 503)):
>    # Do XYZ
>    if e.errno == 12 or (e.errno == 14 and (getattr(e, 'code', 0) == 7)):
>    # Do XYZ
> 
> ...did we want to change the logic for 503 errors?

No. The .code attribute should only be set when errno == 14, (documented
as HTTPError, but in reality it's almost a catch-all) so it's probably
redundant (now).

I've added the test to prevent a possible clash in the future,
as 7 is pretty low ordinal, and something else might use that, too.


More information about the Yum-devel mailing list