Raise statement normalization in Lib/.

This commit is contained in:
Collin Winter 2007-08-30 01:19:48 +00:00
parent 8b3febef2f
commit ce36ad8a46
80 changed files with 502 additions and 530 deletions

View file

@ -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