From ad90cdce305f44476648c5bb4b4d739106bf0af8 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 25 Feb 2023 16:54:24 +0100 Subject: [PATCH] qutebrowser: Fix index error on redirects Fixed silly mistake sometimes trying to reach an out of range redirect url. --- qutebrowser/.config/qutebrowser/redirects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/.config/qutebrowser/redirects.py b/qutebrowser/.config/qutebrowser/redirects.py index 48fccca..701e4ad 100644 --- a/qutebrowser/.config/qutebrowser/redirects.py +++ b/qutebrowser/.config/qutebrowser/redirects.py @@ -197,7 +197,7 @@ def rewrite(request: interceptor.Request): matched=True if matched: - target = service["target"][random.randint(0, len(service["target"]))] + target = service["target"][random.randint(0, len(service["target"])-1)] if target is not None and url.setHost(target) is not False: try: request.redirect(url)