From 91226d1fb73c86b8f731fa44d4250e6e43a6133d Mon Sep 17 00:00:00 2001 From: Eric Chamberlain Date: Fri, 16 Sep 2011 16:30:11 -0700 Subject: [PATCH] Remove duplicate import to silence warning in Eclipse. Force header status to string before checking the first character. Google App Engine uses Python 2.5. --- simplegeo/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simplegeo/__init__.py b/simplegeo/__init__.py index 52d2ae3..14e25a4 100644 --- a/simplegeo/__init__.py +++ b/simplegeo/__init__.py @@ -11,7 +11,7 @@ from simplegeo.util import json_decode, APIError, SIMPLEGEOHANDLE_RSTR, is_simplegeohandle, to_unicode # For backwards compatibility with other codebases. -from simplegeo.util import APIError, DecodeError +from simplegeo.util import DecodeError from simplegeo.models import Record @@ -147,7 +147,7 @@ def _request(self, endpoint, method, data=None): (self.headers, content) = self.http.request( endpoint, method, body=body, headers=headers) - if self.headers['status'][0] not in ('2', '3'): + if str(self.headers['status'])[0] not in ('2', '3'): raise APIError(int(self.headers['status']), content, self.headers) return self.headers, content