From 61d6121252097bd3b096433b41b73c3236a1fa0f Mon Sep 17 00:00:00 2001 From: andrei Date: Mon, 25 Sep 2017 16:11:02 -0700 Subject: [PATCH] [channel] fix bug with MessageIterator when iterating before/after 0 --- disco/types/channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disco/types/channel.py b/disco/types/channel.py index 359e5df..2c01719 100644 --- a/disco/types/channel.py +++ b/disco/types/channel.py @@ -478,7 +478,7 @@ class MessageIterator(object): self.last = None self._buffer = [] - if not any((before, after)) and self.direction == self.Direction.DOWN: + if before is None and after is None and self.direction == self.Direction.DOWN: raise Exception('Must specify either before or after for downward seeking') def fill(self):