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

Skip to content

Commit 694a65f

Browse files
committed
minor fix/update
1 parent 7411052 commit 694a65f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ def filterControlChars(value):
18291829
Returns string value with control
18301830
chars being supstituted with ' '
18311831
"""
1832-
return filterStringValue(output, NON_CONTROL_CHAR_REGEX, ' ')
1832+
return filterStringValue(value, NON_CONTROL_CHAR_REGEX, ' ')
18331833

18341834
def isDBMSVersionAtLeast(version):
18351835
"""

lib/request/basicauthhandler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SmartHTTPBasicAuthHandler(urllib2.HTTPBasicAuthHandler):
1616
"""
1717
def __init__(self, *args, **kwargs):
1818
urllib2.HTTPBasicAuthHandler.__init__(self, *args, **kwargs)
19-
self.retried_req = []
19+
self.retried_req = set()
2020

2121
def reset_retry_count(self):
2222
# Python 2.6.5 will call this on 401 or 407 errors and thus loop
@@ -27,7 +27,7 @@ def reset_retry_count(self):
2727
def http_error_auth_reqed(self, auth_header, host, req, headers):
2828
# Reset the retry counter once for each request.
2929
if hash(req) not in self.retried_req:
30-
self.retried_req.append(hash(req))
30+
self.retried_req.add(hash(req))
3131
self.retried = 0
3232
return urllib2.HTTPBasicAuthHandler.http_error_auth_reqed(
3333
self, auth_header, host, req, headers)

0 commit comments

Comments
 (0)