minor optimization

This commit is contained in:
Miroslav Stampar
2011-11-20 20:14:47 +00:00
parent 7c1af97852
commit 440b7efe55
18 changed files with 44 additions and 44 deletions

View File

@@ -147,7 +147,7 @@ def __setRequestParams():
# No need for url encoding/decoding the user agent
conf.parameters[PLACE.UA] = urldecode(headerValue)
condition = any([not conf.testParameter, intersect(conf.testParameter, USER_AGENT_ALIASES)])
condition = any((not conf.testParameter, intersect(conf.testParameter, USER_AGENT_ALIASES)))
if condition:
conf.paramDict[PLACE.UA] = { PLACE.UA: headerValue }
@@ -157,7 +157,7 @@ def __setRequestParams():
# No need for url encoding/decoding the referer
conf.parameters[PLACE.REFERER] = urldecode(headerValue)
condition = any([not conf.testParameter, intersect(conf.testParameter, REFERER_ALIASES)])
condition = any((not conf.testParameter, intersect(conf.testParameter, REFERER_ALIASES)))
if condition:
conf.paramDict[PLACE.REFERER] = { PLACE.REFERER: headerValue }