mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Lint fix - minor
This commit is contained in:
parent
2476809ff8
commit
a8deed1f4e
@ -174,7 +174,6 @@ class Headers(multidict.MultiDict):
|
|||||||
replacements = 0
|
replacements = 0
|
||||||
flag_count = count > 0
|
flag_count = count > 0
|
||||||
fields = []
|
fields = []
|
||||||
|
|
||||||
for name, value in self.fields:
|
for name, value in self.fields:
|
||||||
line, n = pattern.subn(repl, name + b": " + value, count=count)
|
line, n = pattern.subn(repl, name + b": " + value, count=count)
|
||||||
try:
|
try:
|
||||||
@ -188,7 +187,7 @@ class Headers(multidict.MultiDict):
|
|||||||
if flag_count:
|
if flag_count:
|
||||||
count -= n
|
count -= n
|
||||||
if count == 0:
|
if count == 0:
|
||||||
break
|
break
|
||||||
fields.append((name, value))
|
fields.append((name, value))
|
||||||
self.fields = tuple(fields)
|
self.fields = tuple(fields)
|
||||||
return replacements
|
return replacements
|
||||||
|
@ -103,7 +103,7 @@ class TestMessage(object):
|
|||||||
r = tresp()
|
r = tresp()
|
||||||
r.content = b"foofootoo"
|
r.content = b"foofootoo"
|
||||||
r.replace(b"foo", "gg")
|
r.replace(b"foo", "gg")
|
||||||
assert r.content == b"ggggtoo"
|
assert r.content == b"ggggtoo"
|
||||||
|
|
||||||
r.content = b"foofootoo"
|
r.content = b"foofootoo"
|
||||||
r.replace(b"foo", "gg", count=1)
|
r.replace(b"foo", "gg", count=1)
|
||||||
|
Loading…
Reference in New Issue
Block a user