Changeset 860:63346a670007
- Timestamp:
- 03/10/10 13:39:32 (6 months ago)
- Author:
- johnbywater
- Branch:
- default
- Message:
-
Updated license object attribute (to use normal attribute access, rather than dict key access).
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r858
|
r860
|
|
| 27 | 27 | def __getitem__(self, key, default=Exception): |
| 28 | 28 | for license in self.licenses: |
| 29 | | if key == license['id']: |
| | 29 | if key == license.id: |
| 30 | 30 | return license |
| 31 | 31 | if default != Exception: |
| … |
… |
|
| 35 | 35 | |
| 36 | 36 | def keys(self): |
| 37 | | return [license['id'] for license in self.licenses] |
| | 37 | return [license.id for license in self.licenses] |
| 38 | 38 | |
| 39 | 39 | def values(self): |
| … |
… |
|
| 41 | 41 | |
| 42 | 42 | def items(self): |
| 43 | | return [(license['id'], license) for license in self.licenses] |
| | 43 | return [(license.id, license) for license in self.licenses] |
| 44 | 44 | |
| 45 | 45 | def __iter__(self): |