From 6bde9551709444a9b3859ae33b6174edcc99b03e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 18 Feb 2011 04:39:53 -0500 Subject: [PATCH] Python 2.5 Fixes. --- requests/__init__.py | 7 +++++-- requests/core.py | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/requests/__init__.py b/requests/__init__.py index b6e3841..5c84046 100644 --- a/requests/__init__.py +++ b/requests/__init__.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- -from . import packages -from .core import * +import packages +from core import * + + + diff --git a/requests/core.py b/requests/core.py index cd2e764..1de47c1 100644 --- a/requests/core.py +++ b/requests/core.py @@ -177,7 +177,7 @@ class Request(object): self._build_response(resp) self.response.ok = True - except urllib2.HTTPError as why: + except urllib2.HTTPError, why: self._build_response(why) self.response.error = why @@ -209,7 +209,7 @@ class Request(object): self._build_response(resp) self.response.ok = True - except urllib2.HTTPError as why: + except urllib2.HTTPError, why: self._build_response(why) self.response.error = why @@ -242,7 +242,7 @@ class Request(object): self._build_response(resp) self.response.ok = True - except urllib2.HTTPError as why: + except urllib2.HTTPError, why: self._build_response(why) self.response.error = why -- 2.7.4