Skip to content

Commit

Permalink
Merge pull request #142 from mikelambert/feature/gae
Browse files Browse the repository at this point in the history
Remove assert.
  • Loading branch information
sigmavirus24 committed May 6, 2016
2 parents d2cfc78 + 0b1c3f1 commit 3f72caf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions requests_toolbelt/adapters/appengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,9 @@ def urlopen(self, method, url, body=None, headers=None, retries=None,
# but the AppEngineManager expects an absolute URL.
# So we saved out the self.url when the AppEngineConnection
# was constructed, which we then can use down below instead.
# Let's verify our assumptions here though, just in case.
assert self.url.endswith(url), (
"AppEngineConnection constructed "
"with (%s), and called urlopen with (%s). Expected the latter "
"to be the host-relative equivalent of the former." %
(self.url, url))

# We once tried to verify our assumptions here, but sometimes the
# passed-in URL differs on url fragments, or "http://a.com" vs "/".

# Jump through the hoops necessary to call AppEngineManager's API.
return self.appengine_manager.urlopen(
Expand Down

0 comments on commit 3f72caf

Please sign in to comment.