Collection returned by getBugSubscriberPackages() via LP API claims to have elements, but they aren't accessible.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Triaged
|
High
|
Unassigned |
Bug Description
I can iterate over collections returned by launchpadlib, but not those returned by user.getBugSubs
-----
#!/usr/bin/python -tt
from launchpadlib.
cachedir = "~/.launchpadli
launchpad = Launchpad.
user = launchpad.
packages = user.getBugSubs
total_size = packages.total_size # len(packages) gives the same value.
assert(total_size > 0)
iter_size = 0
for p in packages:
iter_size += 1
if iter_size != total_size:
print 'Iteration does not work. Total_size is', total_size, ', but iterated size is', iter_size
else:
print "Iteration works."
------
What should happen:
It prints "Iteration works.".
What happens instead:
It prints "Iteration does not work. Total_size is 10 , but iterated size is 0".
summary: |
- Iterating over results from getBugSubscriberPackages does not work + Collection returned by getBugSubscriberPackages() via LP API claims to + have elements, but they aren't accessible. |
Changed in launchpadlib: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: api |