Skip to content

Commit 182e0b0

Browse files
ricardobranco777crobinso
authored andcommitted
Fix API key leak
1 parent 80a0316 commit 182e0b0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎bugzilla/_session.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ def request(self, *args, **kwargs):
9898
if "timeout" not in kwargs:
9999
kwargs["timeout"] = timeout
100100

101-
response = self._session.request(*args, **kwargs)
101+
try:
102+
response = self._session.request(*args, **kwargs)
102103

103-
if self._is_xmlrpc:
104-
# Yes this still appears to matter for properly decoding unicode
105-
# code points in bugzilla.redhat.com content
106-
response.encoding = "UTF-8"
104+
if self._is_xmlrpc:
105+
# This still appears to matter for properly decoding unicode
106+
# code points in bugzilla.redhat.com content
107+
response.encoding = "UTF-8"
107108

108-
try:
109109
response.raise_for_status()
110110
except requests.HTTPError as e:
111111
# Scrape the api key out of the returned exception string

0 commit comments

Comments
 (0)