Skip to content

Commit

Permalink
Removing legacy logging logic from stormpath.http.
Browse files Browse the repository at this point in the history
This was causing errors in certain circumstances where UTF-8 encoding was not
being used.
  • Loading branch information
rdegges committed Jul 18, 2016
1 parent ef45a94 commit 9926c6c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions stormpath/http.py
Expand Up @@ -24,10 +24,6 @@
from .error import Error


import logging
log = logging.getLogger(__name__)


class HttpExecutor(object):
"""Handles the actual HTTP requests to the Stormpath service.
Expand Down Expand Up @@ -103,8 +99,6 @@ def pause_exponentially(self, retries):

delay = min(delay, self.MAX_BACKOFF_IN_MILLISECONDS)

log.debug("Retryable condition detected, will retry in %s ms, attempt number: %s" % (delay, retries))

# sleep in seconds
time.sleep(delay / float(1000))

Expand Down Expand Up @@ -160,10 +154,6 @@ def request(self, method, url, data=None, params=None, headers=None, retry_count
else:
raise Error({'developerMessage': str(e)})

log.debug('HttpExecutor.request(method={}, url={}, params={}, data={}, headers={}) -> [{}] {}'.format(
method, url, repr(params), repr(data), repr(headers), r.status_code, r.text
))

if r.status_code in [301, 302] and 'location' in r.headers:
if not r.headers['location'].startswith(self.base_url):
message = 'Trying to redirect outside of API base url: {}'.format(r.headers['location'])
Expand Down

0 comments on commit 9926c6c

Please sign in to comment.