Conditions | 4 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 8 |
Ratio | 100 % |
Changes | 0 |
1 | """ |
||
55 | def _get_stream(self, media, ignore_error): |
||
56 | """ |
||
57 | @TODO: add documentation |
||
58 | """ |
||
59 | media_attr = next((stream for stream in self.streams if stream['codec_type'] == media), None) |
||
60 | if media_attr is None and not ignore_error: |
||
61 | raise ValueError('No ' + str(media) + ' stream found') |
||
62 | return media_attr if media_attr is not None else {} |
||
63 | |||
71 |