Missing total_size on collections returned by named operations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wadllib |
Fix Released
|
Undecided
|
Leonard Richardson |
Bug Description
As you can see in the attached example the result of the searchTasks method does not have attributes like total_size, so it does not behave like other collections:
In [30]: bughelper = launchpad.
In [31]: bugs = bughelper.
In [32]: len(bugs)
-------
<type 'exceptions.
/media/
/media/
488 return int(self.
489 except AttributeError:
--> 490 raise TypeError(
491
492 def __iter__(self):
<type 'exceptions.
Markus
Related branches
- LAZR Developers: Pending requested
-
Diff: 17 lines (+3/-3)1 file modifiedsrc/wadllib/application.py (+3/-3)
summary: |
- result of searchTasks does not behave like other collections + Missing total_size on collections returned by named operations |
This is a general problem with launchpadlib when dealing with collections that are the return values of named operations. Until this is fixed, use this workaround:
int(return_ value._ wadl_resource. representation[ 'total_ size'])