From e5766550f1576a02facb95b452e4a52271780b63 Mon Sep 17 00:00:00 2001 From: arjun23496 Date: Wed, 31 Aug 2016 16:22:20 +0530 Subject: Lint fix - netlib headers --- netlib/http/headers.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'netlib/http/headers.py') diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 5f724f6d..6afe27c7 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -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 -- cgit v1.2.3