Commit ed206fef authored by ale's avatar ale

check the right status code attribute on the urllib2 response

parent c2bd786d
......@@ -70,8 +70,8 @@ def submit(results, submit_url):
json.dumps(results),
{'Content-Type': 'application/json'})
resp = opener.open(req)
if resp.status_code != 200:
log.error('submit error: HTTP status %d', resp.status_code)
if resp.code != 200:
log.error('submit error: HTTP status %d', resp.code)
except Exception, e:
log.error('submit error: %s', e)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment