From 71b6b84f29d74629656794504361b06f80909a7e Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Sun, 24 Jul 2016 22:21:04 +0530 Subject: [PATCH] Fix console search on Python 3 --- mitmproxy/console/searchable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mitmproxy/console/searchable.py b/mitmproxy/console/searchable.py index c60d1cd98..d58d3d13f 100644 --- a/mitmproxy/console/searchable.py +++ b/mitmproxy/console/searchable.py @@ -78,9 +78,9 @@ class Searchable(urwid.ListBox): return # Start search at focus + 1 if backwards: - rng = xrange(len(self.body) - 1, -1, -1) + rng = range(len(self.body) - 1, -1, -1) else: - rng = xrange(1, len(self.body) + 1) + rng = range(1, len(self.body) + 1) for i in rng: off = (self.focus_position + i) % len(self.body) w = self.body[off]