mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Lint fix - netlib headers
This commit is contained in:
parent
dd2e0d1df3
commit
e5766550f1
@ -173,8 +173,8 @@ class Headers(multidict.MultiDict):
|
||||
pattern = re.compile(pattern, flags)
|
||||
replacements = 0
|
||||
flag_count = count > 0
|
||||
|
||||
fields = []
|
||||
|
||||
for name, value in self.fields:
|
||||
line, n = pattern.subn(repl, name + b": " + value, count=count)
|
||||
try:
|
||||
@ -185,12 +185,10 @@ class Headers(multidict.MultiDict):
|
||||
pass
|
||||
else:
|
||||
replacements += n
|
||||
|
||||
if flag_count:
|
||||
count -= n
|
||||
if count == 0:
|
||||
break;
|
||||
|
||||
break
|
||||
fields.append((name, value))
|
||||
self.fields = tuple(fields)
|
||||
return replacements
|
||||
|
Loading…
Reference in New Issue
Block a user