distribution.getSeries() raises HTTPError on redirect

Bug #628267 reported by dobey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restfulclient
Triaged
Low
Unassigned

Bug Description

Attmpeting to do dsitribution[u'Ubuntu'].getSeries(name_or_version=u'maverick') results in the following:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./bin/lp-buildrecipe", line 47, in __login_and_go
    series = distro.getSeries(name_or_version=self.series)
  File "/usr/lib/python2.6/dist-packages/lazr/restfulclient/resource.py", line 528, in __call__
    url, in_representation, http_method, extra_headers=extra_headers)
  File "/usr/lib/python2.6/dist-packages/lazr/restfulclient/_browser.py", line 277, in _request
    raise HTTPError(response, content)
HTTPError: HTTP Error 301: Moved Permanently
Response headers:
---
content-length: 0
content-type: text/plain;charset=utf-8
date: Wed, 01 Sep 2010 18:02:23 GMT
location: https://api.edge.launchpad.net/1.0/ubuntu?ws.op=getSeries&name_or_version=%22maverick%22
server: zope.server.http (HTTP)
status: 301
vary: Accept,Accept-Encoding
via: 1.1 wildcard.edge.launchpad.net
x-content-type-warning: guessed from content
x-powered-by: Zope (www.zope.org), Python (www.python.org)
---
Response body:
---

---

Gary Poster (gary)
Changed in lazr.restfulclient:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Gary Poster (gary) wrote :

Confirmed. The work around is to use distribution[u'ubuntu'].getSeries(name_or_version=u'maverick') . That is, use u'ubuntu' instead of u'Ubuntu'. Eventually we'll get around to making launchpadlib more robust for this.

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.