fix for a bug reported by BugTrace (IndexError: list index out of range)

This commit is contained in:
Miroslav Stampar 2010-11-22 10:58:08 +00:00
parent bfc9378542
commit c471b815cc

View File

@ -946,7 +946,7 @@ def __setHTTPUserAgent():
if __count == 1: if __count == 1:
__userAgent = kb.userAgents[0] __userAgent = kb.userAgents[0]
else: else:
__userAgent = kb.userAgents[randomRange(stop=__count)] __userAgent = kb.userAgents[randomRange(stop=__count-1)]
__userAgent = sanitizeStr(__userAgent) __userAgent = sanitizeStr(__userAgent)
conf.httpHeaders.append(("User-Agent", __userAgent)) conf.httpHeaders.append(("User-Agent", __userAgent))