Skip to content

Commit

Permalink
Merge branch 'master' of github.com:GeoNode/geonode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Garcia Silva committed Jul 28, 2021
2 parents 3db74fc + 89a1138 commit 5a65e39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions geonode/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1625,10 +1625,11 @@ def request(self, url, method='GET', data=None, headers={}, stream=False,
content = str(e)
else:
response = session.get(url, headers=headers, timeout=self.timeout)
if response:
try:
content = ensure_string(response.content) if not stream else response.raw
except Exception:
content = None
except Exception as e:
content = str(e)

return (response, content)

Expand Down

0 comments on commit 5a65e39

Please sign in to comment.