Commit 11b642e3 authored by Christian Heimes's avatar Christian Heimes

Fixed test_urllibnet

parent 3496ef4a
......@@ -13,10 +13,12 @@ import mimetools
def _open_with_retry(func, host, *args, **kwargs):
# Connecting to remote hosts is flaky. Make it more robust
# by retrying the connection several times.
last_exc = None
for i in range(3):
try:
return func(host, *args, **kwargs)
except IOError, last_exc:
except IOError as err:
last_exc = err
continue
except:
raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment