lp_save gives HTTP Error 412: Precondition Failed when adding a comment to a bug, but adds the comment anyway
Bug #341950 reported by
Ursula Junque
This bug report is a duplicate of:
Bug #336866: When adding tag or updating description, lp_save() gives "HTTP Error 412: Precondition Failed".
Edit
Remove
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
New
|
Undecided
|
Eleanor Berger |
Bug Description
When trying to add a comment to a bug, it throws a HTTPError exception, but adds the comment.
Steps to reproduce:
1) Having a lp authenticated object:
>>> bug = lp.bugs[2112]
>>> bug.newMessage(
<message at https:/
>>> bug.lp_save()
HTTPError: HTTP Error 412: Precondition Failed
Checking the bug page, it shows the added comment.
This may be related to bug 336866.
Changed in malone: | |
assignee: | nobody → intellectronica |
description: | updated |
To post a comment you must log in.
I get this problem when trying to set a duplicate:
>>> b.duplicate_of python2. 6/dist- packages/ launchpadlib/ resource. py", line 489, in lp_save self.self_ link), representation, headers) python2. 6/dist- packages/ launchpadlib/ _browser. py", line 266, in patch extra_headers) python2. 6/dist- packages/ launchpadlib/ _browser. py", line 212, in _request errors. HTTPError: HTTP Error 412: Precondition Failed
>>> b.duplicate_of = 341478
>>> b.lp_save()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
URI(
File "/usr/lib/
'PATCH', extra_headers=
File "/usr/lib/
raise HTTPError(response, content)
launchpadlib.
And unlike for comments, it does not actually set the duplicate, so the HTTPError cannot just be ignored.