[common] post_content: make log right

This commit is contained in:
Mort Yao 2018-09-11 23:49:39 +02:00
parent cc69f0945a
commit 5dfee49688
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -450,8 +450,10 @@ def post_content(url, headers={}, post_data={}, decoded=True, **kwargs):
Returns:
The content as a string.
"""
logging.debug('post_content: %s \n post_data: %s' % (url, post_data))
if kwargs.get('post_data_raw'):
logging.debug('post_content: %s\npost_data_raw: %s' % (url, kwargs['post_data_raw']))
else:
logging.debug('post_content: %s\npost_data: %s' % (url, post_data))
req = request.Request(url, headers=headers)
if cookies: