Skip to content
Snippets Groups Projects
Commit f5e74fd4 authored by Stephen Frost's avatar Stephen Frost
Browse files

Fix typo that causes exception when !200 response

When we get a non-200 response, we try to log what we got but there was
a typo and instead we ended up throwing an exception:

Failed to load taglist for pgsql-announce: Exception 'Response' object has no attribute 'statuscode'

Fix that by changing statuscode -> status_code.
parent 23966b39
No related branches found
No related tags found
1 merge request!32Fix typo that causes exception when !200 response
Pipeline #740790753 passed
......@@ -360,7 +360,7 @@ OR EXISTS (SELECT 1 FROM mailinglist_whitelist WHERE listid=%(id)s AND email=%(e
try:
r = requests.get(self.taglistsource)
if r.status_code != 200:
log(curs, 2, 'mail', "Failed to load taglist for {0}: status code {1}".format(self.name, r.statuscode))
log(curs, 2, 'mail', "Failed to load taglist for {0}: status code {1}".format(self.name, r.status_code))
return
taglist = r.json()
curs.execute("""WITH t AS (SELECT * FROM json_to_recordset(%(json)s) AS (urlname text, name text, description text, sortkey int)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment