Skip to content

Google App Engine fix for exception caused by older libraries. #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions simplegeo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down