summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllibnet.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-27 15:45:24 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-27 15:45:24 (GMT)
commit061ce7fda739a2711245cb121ef410ddf70a784c (patch)
treed79e7f7aecd817316daac9981f4e0b5eb13411c3 /Lib/test/test_urllibnet.py
parent7e182548faeabc526f6eed546933e9745949f584 (diff)
downloadcpython-061ce7fda739a2711245cb121ef410ddf70a784c.zip
cpython-061ce7fda739a2711245cb121ef410ddf70a784c.tar.gz
cpython-061ce7fda739a2711245cb121ef410ddf70a784c.tar.bz2
Fixed test_urllibnet
Diffstat (limited to 'Lib/test/test_urllibnet.py')
-rw-r--r--Lib/test/test_urllibnet.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index c9a483a..e9f1fea 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -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