Moved JsonDebugPrinter to existing utils module

This commit is contained in:
Chuddah 2020-02-22 15:04:28 +00:00
parent 7491000a13
commit de493d13dd
6 changed files with 25 additions and 24 deletions

View file

@ -11,7 +11,7 @@ import requests
from six import string_types
from .exceptions import HTTPException
from helper import debug
from helper.utils import JsonDebugPrinter
#################################################################################################
@ -81,7 +81,7 @@ class HTTP(object):
raise AttributeError("Request cannot be empty")
data = self._request(data)
LOG.debug("--->[ http ] %s", debug.JsonDebugPrinter(data))
LOG.debug("--->[ http ] %s", JsonDebugPrinter(data))
retry = data.pop('retry', 5)
while True:
@ -163,7 +163,7 @@ class HTTP(object):
elapsed = int(r.elapsed.total_seconds() * 1000)
response = r.json()
LOG.debug("---<[ http ][%s ms]", elapsed)
LOG.debug(debug.JsonDebugPrinter(response))
LOG.debug(JsonDebugPrinter(response))
return response
except ValueError: