From c2c6a864d2fea9948f04f973bb69f3a6368a9316 Mon Sep 17 00:00:00 2001 From: Davide Depau Date: Thu, 21 Dec 2017 15:55:36 +0100 Subject: [PATCH] Make sure `item` is instance of `slice` in `__getitem__` --- ffmpeg/nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg/nodes.py b/ffmpeg/nodes.py index 5c3067d..fea04a8 100644 --- a/ffmpeg/nodes.py +++ b/ffmpeg/nodes.py @@ -49,7 +49,7 @@ class Stream(object): Please note that this can only be used to select a substream that already exist. If you want to split the stream, use the `split` filter. """ - if item.start != None: + if not isinstance(item, slice) or item.start is not None: raise ValueError("Invalid syntax. Use 'stream[:\"something\"]', not 'stream[\"something\"]'.") return self.node.stream(select=item.stop)