Comment 9 for bug 336866

Revision history for this message
Martin Pitt (pitti) wrote :

I get this problem when trying to set a duplicate:

>>> b.duplicate_of
>>> b.duplicate_of = 341478
>>> b.lp_save()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/launchpadlib/resource.py", line 489, in lp_save
    URI(self.self_link), representation, headers)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 266, in patch
    'PATCH', extra_headers=extra_headers)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 212, in _request
    raise HTTPError(response, content)
launchpadlib.errors.HTTPError: HTTP Error 412: Precondition Failed

And unlike for comments, it does not actually set the duplicate, so the HTTPError cannot just be ignored.