summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/urllib2.py
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r--Lib/urllib2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 0995aeb..32fb205 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -210,7 +210,7 @@ class Request:
if hasattr(Request, 'get_' + name):
getattr(self, 'get_' + name)()
return getattr(self, attr)
- raise AttributeError, attr
+ raise AttributeError(attr)
def get_method(self):
if self.has_data():
@@ -236,7 +236,7 @@ class Request:
if self.type is None:
self.type, self.__r_type = splittype(self.__original)
if self.type is None:
- raise ValueError, "unknown url type: %s" % self.__original
+ raise ValueError("unknown url type: %s" % self.__original)
return self.type
def get_host(self):
@@ -1250,7 +1250,7 @@ class FTPHandler(BaseHandler):
import mimetypes
host = req.get_host()
if not host:
- raise IOError, ('ftp error', 'no host given')
+ raise IOError('ftp error', 'no host given')
host, port = splitport(host)
if port is None:
port = ftplib.FTP_PORT