diff options
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r-- | Lib/urllib2.py | 6 |
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 |