From 4c8b428bbd3800cafa0e3764512eb719f67315f0 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 14 Feb 2011 09:34:36 -0500 Subject: [PATCH] except clause fix for python3 --- requests/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requests/core.py b/requests/core.py index 43d09cf..e63dc22 100644 --- a/requests/core.py +++ b/requests/core.py @@ -141,7 +141,7 @@ class Request(object): self.response.content = resp.read() success = True - except urllib2.HTTPError, why: + except urllib2.HTTPError as why: self.response.status_code = why.code @@ -165,7 +165,7 @@ class Request(object): success = True - except urllib2.HTTPError, why: + except urllib2.HTTPError as why: self.response.status_code = why.code @@ -203,7 +203,7 @@ class Request(object): success = True - except(urllib2.HTTPError, why): + except urllib2.HTTPError as why: self.response.status_code = why.code @@ -225,7 +225,7 @@ class Response(object): def __repr__(self): return '' % (self.status_code) - + class AuthObject(object): -- 2.7.4