setCommentVisibility() gives 401: unauthorized error

Bug #373508 reported by Bryce Harrington
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Bryce Harrington

Bug Description

I notice the new setCommentVisibility() routine mentioned in the LPL docs so gave it a shot, however it seems not to work:

./test > /tmp/hide_output.txt 2>&1
Traceback (most recent call last):
  File "./test", line 20, in <module>
    d = lp.load("https://api.edge.launchpad.net/beta/ubuntu")
  File "/usr/lib/python2.6/dist-packages/launchpadlib/launchpad.py", line 70, in load
    document = self._browser.get(url)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 222, in get
    response, content = self._request(url, extra_headers=headers)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 212, in _request
    raise HTTPError(response, content)
launchpadlib.errors.HTTPError: HTTP Error 401: Unauthorized

test script and output attached

Tags: lp-bugs qa-ok

Related branches

Revision history for this message
Bryce Harrington (bryce) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :
Revision history for this message
Gavin Panella (allenap) wrote :

setCommentVisibility() is restricted to Launchpad admins, so this is
expected behaviour.

However, this should be mentioned in +apidoc, or another way should be
found to expose the security restrictions on API calls (like a more
informative error message).

affects: launchpadlib → malone
Changed in malone:
importance: Undecided → Medium
status: New → Triaged
Bryce Harrington (bryce)
Changed in malone:
assignee: nobody → Bryce Harrington (bryceharrington)
Bryce Harrington (bryce)
Changed in malone:
milestone: none → 10.05
Bryce Harrington (bryce)
Changed in malone:
status: Triaged → In Progress
Deryck Hodge (deryck)
Changed in malone:
milestone: 10.05 → 10.06
Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
Changed in malone:
status: In Progress → Fix Committed
tags: added: qa-needstesting
Bryce Harrington (bryce)
Changed in malone:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in malone:
status: Fix Committed → Fix Released
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.