qutebrowser: Fix index error on redirects
Fixed silly mistake sometimes trying to reach an out of range redirect url.
This commit is contained in:
parent
9a874b1a1b
commit
ad90cdce30
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ def rewrite(request: interceptor.Request):
|
||||||
matched=True
|
matched=True
|
||||||
|
|
||||||
if matched:
|
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:
|
if target is not None and url.setHost(target) is not False:
|
||||||
try:
|
try:
|
||||||
request.redirect(url)
|
request.redirect(url)
|
||||||
|
|
Loading…
Reference in a new issue