diff --git a/lib/core/common.py b/lib/core/common.py index 80b54dda8..db0bd65f8 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1829,7 +1829,7 @@ def filterControlChars(value): Returns string value with control chars being supstituted with ' ' """ - return filterStringValue(output, NON_CONTROL_CHAR_REGEX, ' ') + return filterStringValue(value, NON_CONTROL_CHAR_REGEX, ' ') def isDBMSVersionAtLeast(version): """ diff --git a/lib/request/basicauthhandler.py b/lib/request/basicauthhandler.py index cb6f63eea..abbb57d3c 100644 --- a/lib/request/basicauthhandler.py +++ b/lib/request/basicauthhandler.py @@ -16,7 +16,7 @@ class SmartHTTPBasicAuthHandler(urllib2.HTTPBasicAuthHandler): """ def __init__(self, *args, **kwargs): urllib2.HTTPBasicAuthHandler.__init__(self, *args, **kwargs) - self.retried_req = [] + self.retried_req = set() def reset_retry_count(self): # Python 2.6.5 will call this on 401 or 407 errors and thus loop @@ -27,7 +27,7 @@ class SmartHTTPBasicAuthHandler(urllib2.HTTPBasicAuthHandler): def http_error_auth_reqed(self, auth_header, host, req, headers): # Reset the retry counter once for each request. if hash(req) not in self.retried_req: - self.retried_req.append(hash(req)) + self.retried_req.add(hash(req)) self.retried = 0 return urllib2.HTTPBasicAuthHandler.http_error_auth_reqed( self, auth_header, host, req, headers)