qutebrowser: Fix index error on redirects

Fixed silly mistake sometimes trying to reach an out of range redirect
url.
This commit is contained in:
Marty Oehme 2023-02-25 16:54:24 +01:00
parent 9a874b1a1b
commit ad90cdce30
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -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)