Deleting a file from a release raises exceptions.

Bug #277533 reported by Ohad Kammar
4
Affects Status Importance Assigned to Milestone
launchpadlib
Triaged
Low
Unassigned

Bug Description

When deleting a file from a release, exceptions are thrown.

To reproduce, run the following in python:
from launchpadlib.launchpad \
  import Launchpad,STAGING_SERVICE_ROOT
cachedir = #### Enter your cachedir here.
lp = Launchpad.get_token_and_login('bug reproduction', STAGING_SERVICE_ROOT, cachedir)
#### ... authorization handshake. Make sure you give the script privileges to change anything!
proj = lp.projects['name-of-project'] #### Enter the name of a project with the following properties:
#### 1. You have access privileges to delete release files.
#### 2. The project has a release with files uploaded to it.
>>> rel = proj.releases[0] #### Replace '0' by the number of the release with the file in it.
>>> f = rel.files[0]
>>> f.delete()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-i686/egg/launchpadlib/resource.py", line 341, in __call__
  File "build/bdist.linux-i686/egg/launchpadlib/resource.py", line 452, in lp_refresh
  File "build/bdist.linux-i686/egg/launchpadlib/resource.py", line 274, in lp_refresh
  File "build/bdist.linux-i686/egg/launchpadlib/_browser.py", line 221, in get
  File "build/bdist.linux-i686/egg/launchpadlib/_browser.py", line 211, in _request
launchpadlib.errors.HTTPError: HTTP Error 404: Not Found
################################################

Tags: api
Curtis Hovey (sinzui)
Changed in launchpad-registry:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Leonard Richardson (leonardr) wrote :

launchpadlib tries to refresh its view of the file and can't handle the fact that the file isn't there anymore.

affects: launchpad-registry → launchpadlib
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.