Comment 3 for bug 336866

Revision history for this message
Leonard Richardson (leonardr) wrote : Re: When adding tag, lp_save() gives "HTTP Error 412: Precondition Failed"

Here are the last two requests:

send: 'PATCH /beta/bugs/292317
if-match: "72a9365dbdc47f3cfeb7e05896b38208e23ddc75
send: '{"tags": ["needs-xorglog"]}'
reply: 'HTTP/1.1 209 Content Returned\r\n'

send: 'PATCH /beta/bugs/292317
if-match: "7f60495c065527a42d5d0e5bc4aaf14be1e73123"
send: '{"tags": ["needs-xorglog", "needs-lspci-vvnn"]}'
reply: 'HTTP/1.1 412 Precondition Failed\r\n'

Are you calling lp_save() twice, or just once? It would be helpful if you made a GET request after every call to lp_save(), to see what the server thinks the ETag is at each stage.

This might be a problem with the way launchpadlib handles the 209 response code.