introspection feature is broken for collections with few elements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Triaged
|
Low
|
Unassigned |
Bug Description
collections with only a few members are missing the next_collection
Example:
In [41]: b = launchpad.
In [42]: dir(b.subscript
Out[42]:
['FIND_ATTRIBUTES',
'FIND_
'FIND_ENTRIES',
'JSON_MEDIA_TYPE',
'__class__',
'__delattr__',
'__dict__',
'__doc__',
'__getattr__',
'__getattribut
'__getitem__',
'__hash__',
'__init__',
'__iter__',
'__len__',
'__members__',
'__methods__',
'__module__',
'__new__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__setattr__',
'__str__',
'__weakref__',
'_convert_
'_create_
'_ensure_
'_get_
'_get_
'_get_slice',
'_root',
'_transform_
'_wadl_resource',
'_with_
'entries',
'entry_links',
'lp_attributes',
'lp_collections',
'lp_entries',
'lp_get_
'lp_get_
'lp_has_
'lp_operations',
'lp_refresh',
'next',
'prev',
'resource_
'start',
'total_size']
In [43]: b.subscriptions
-------
AttributeError Traceback (most recent call last)
/home/markus/
/usr/lib/
288 except KeyError:
289 raise AttributeError(
--> 290 % (self._
291
292 def _get_external_
AttributeError: 'Collection' object has no attribute 'next'
In [44]:
The best solution would be if .next could return None in such cases.
Markus
Changed in launchpadlib: | |
importance: | Undecided → Low |
status: | New → Triaged |