Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a8a5db

Browse files
committed
minor code restyling
1 parent e33a48d commit 6a8a5db

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/core/option.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,18 +1054,18 @@ def __setHTTPUserAgent():
10541054

10551055
return
10561056

1057-
__count = len(kb.userAgents)
1057+
count = len(kb.userAgents)
10581058

1059-
if __count == 1:
1060-
__userAgent = kb.userAgents[0]
1059+
if count == 1:
1060+
userAgent = kb.userAgents[0]
10611061
else:
1062-
__userAgent = kb.userAgents[randomRange(stop=__count-1)]
1062+
userAgent = kb.userAgents[randomRange(stop=count-1)]
10631063

1064-
__userAgent = sanitizeStr(__userAgent)
1065-
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, __userAgent))
1064+
userAgent = sanitizeStr(userAgent)
1065+
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, userAgent))
10661066

10671067
logMsg = "fetched random HTTP User-Agent header from "
1068-
logMsg += "file '%s': %s" % (paths.USER_AGENTS, __userAgent)
1068+
logMsg += "file '%s': %s" % (paths.USER_AGENTS, userAgent)
10691069
logger.info(logMsg)
10701070

10711071
def __setHTTPReferer():

0 commit comments

Comments
 (0)