Private GIT

Skip to content
Snippets Groups Projects
Commit 30a4fbb1 authored by miigotu's avatar miigotu
Browse files

Merge pull request #2463 from SiCKRAGETV/start-recursion-fixes

Bad indent maybe caused recursion depth error?
parents 52decd1b 9750a239
No related branches found
No related tags found
No related merge requests found
......@@ -1358,6 +1358,11 @@ def getURL(url, post_data=None, params={}, headers={}, timeout=30, session=None,
"""
session = _setUpSession(session, headers)
for param in params:
if isinstance(params[param], unicode):
params[param] = params[param].encode('utf-8')
session.params = params
try:
......@@ -1405,7 +1410,7 @@ def getURL(url, post_data=None, params={}, headers={}, timeout=30, session=None,
return
attempts = 0
while(gzip and len(resp.content) > 1 and resp.content[0] == '\x1f' and resp.content[1] == '\x8b' and attempts < 3):
while gzip and len(resp.content) > 1 and resp.content[0] == '\x1f' and resp.content[1] == '\x8b' and attempts < 3:
attempts += 1
resp._content = gzip.GzipFile(fileobj=_StringIO(resp.content)).read()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment