Comment 0 for bug 336866

Revision history for this message
Bryce Harrington (bryce) wrote : When adding tag, lp_save() gives "HTTP Error 412: Precondition Failed"

Getting this error consistently when attempting to add a tag using the following code (which worked last time I ran it a few weeks ago).

     if not tag in bug.tags:
           #bug.tags.append(tag)
            # Workaround bug #254901
            tag_list = bug.tags
            tag_list.append(tag)
            bug.tags = tag_list

            print " ---> Tagged ",tag
            bug.lp_save()

I also tested with the commented line instead of the workaround code; same error.

228867 New IBM T43 use hdaps-gl flash [No attachments]
 ---> Tagged needs-xorglog
Traceback (most recent call last):
  File "./process-new-bugs.py", line 171, in <module>
    bug.append_tag("needs-xorglog")
  File "/home/bryce/src/Arsenal/arsenal/contrib/arsenal_lib.py", line 125, in append_tag
    self.bug.lp_save()
  File "build/bdist.linux-x86_64/egg/launchpadlib/resource.py", line 489, in lp_save
  File "build/bdist.linux-x86_64/egg/launchpadlib/_browser.py", line 266, in patch
  File "build/bdist.linux-x86_64/egg/launchpadlib/_browser.py", line 212, in _request
launchpadlib.errors.HTTPError: HTTP Error 412: Precondition Failed