From c471b815cca289dc4bd447e49db09c884d1dfe75 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 22 Nov 2010 10:58:08 +0000 Subject: [PATCH] fix for a bug reported by BugTrace (IndexError: list index out of range) --- lib/core/option.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 3721f55dc..e4e24cfcf 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -946,7 +946,7 @@ def __setHTTPUserAgent(): if __count == 1: __userAgent = kb.userAgents[0] else: - __userAgent = kb.userAgents[randomRange(stop=__count)] + __userAgent = kb.userAgents[randomRange(stop=__count-1)] __userAgent = sanitizeStr(__userAgent) conf.httpHeaders.append(("User-Agent", __userAgent))