Return a dictionary of |Part| instances unmarshalled from `pkg_reader`, keyed by partname. Side-effect is that each part in `pkg_reader` is constructed using `part_factory`.
(pkg_reader, package, part_factory)
| 197 | |
| 198 | @staticmethod |
| 199 | def _unmarshal_parts(pkg_reader, package, part_factory): |
| 200 | """Return a dictionary of |Part| instances unmarshalled from `pkg_reader`, keyed |
| 201 | by partname. |
| 202 | |
| 203 | Side-effect is that each part in `pkg_reader` is constructed using |
| 204 | `part_factory`. |
| 205 | """ |
| 206 | parts = {} |
| 207 | for partname, content_type, reltype, blob in pkg_reader.iter_sparts(): |
| 208 | parts[partname] = part_factory(partname, content_type, reltype, blob, package) |
| 209 | return parts |
| 210 | |
| 211 | @staticmethod |
| 212 | def _unmarshal_relationships(pkg_reader, package, parts): |