summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-08-11 15:02:57 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-08-11 15:02:57 (GMT)
commit58682b7fe53d9bf7fefea59413d47ddd3c9a7d5f (patch)
tree900facacfa724e3b211ffb331c6d586e453de606 /Lib/urllib.py
parentf3456912e46ba74233e219a94f48e29c85280abc (diff)
downloadcpython-58682b7fe53d9bf7fefea59413d47ddd3c9a7d5f.zip
cpython-58682b7fe53d9bf7fefea59413d47ddd3c9a7d5f.tar.gz
cpython-58682b7fe53d9bf7fefea59413d47ddd3c9a7d5f.tar.bz2
Only catch the errors that can actually occur, as reported in bug #411881.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 82b5fb9..f60a841 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -134,7 +134,7 @@ class URLopener:
for file in self.__tempfiles:
try:
self.__unlink(file)
- except:
+ except OSError:
pass
del self.__tempfiles[:]
if self.tempcache:
@@ -1069,7 +1069,7 @@ def unquote(s):
try:
myappend(mychr(myatoi(item[:2], 16))
+ item[2:])
- except:
+ except ValueError:
myappend('%' + item)
else:
myappend('%' + item)