Lint fix - minor

This commit is contained in:
arjun23496 2016-08-31 16:39:04 +05:30
parent 2476809ff8
commit a8deed1f4e
2 changed files with 2 additions and 3 deletions

View File

@ -174,7 +174,6 @@ class Headers(multidict.MultiDict):
replacements = 0
flag_count = count > 0
fields = []
for name, value in self.fields:
line, n = pattern.subn(repl, name + b": " + value, count=count)
try:
@ -188,7 +187,7 @@ class Headers(multidict.MultiDict):
if flag_count:
count -= n
if count == 0:
break
break
fields.append((name, value))
self.fields = tuple(fields)
return replacements

View File

@ -103,7 +103,7 @@ class TestMessage(object):
r = tresp()
r.content = b"foofootoo"
r.replace(b"foo", "gg")
assert r.content == b"ggggtoo"
assert r.content == b"ggggtoo"
r.content = b"foofootoo"
r.replace(b"foo", "gg", count=1)