temporary_blobs.fetch returns a representation of the blob rather than the temporary_blob object

Bug #612990 reported by Diogo Matsubara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Using fetch() to fetch a temporary_blob object returns its representation rather than the object itself.

>>> lp
<launchpadlib.launchpad.Launchpad object at 0xa581e6c>
>>> token
'672321c0-9eaa-11df-891c-00132120529e'
>>> lp.temporary_blobs.fetch(token=token)
{u'http_etag': u'"a55c2b8eec733ddba83775414abe54902789567b-8a17e50c782a4bb73fdfd065b21a1389768f0091"',
 u'resource_type_link': u'https://api.edge.launchpad.net/1.0/#temporary_blob',
 u'self_link': u'https://api.edge.launchpad.net/1.0/temporary-blobs/672321c0-9eaa-11df-891c-00132120529e',
 u'token': u'672321c0-9eaa-11df-891c-00132120529e'}

Workaround is to use:

>>> blob_info = lp.temporary_blobs.fetch(token='672321c0-9eaa-11df-891c-00132120529e')
>>> blob = lp.load(blob_info['self_link'])
>>> blob
<temporary_blob at https://api.edge.launchpad.net/1.0/temporary-blobs/672321c0-9eaa-11df-891c-00132120529e>
>>> blob.getProcessedData
<lazr.restfulclient.resource.NamedOperation object at 0xa1ec56c>

Tags: api lp-bugs
Deryck Hodge (deryck)
Changed in malone:
importance: Undecided → Low
status: New → Triaged
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.