Skip to content
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