From 50164e335254bdf6200db421835fc34cc5a291c2 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 16 Dec 2013 16:54:58 +0100 Subject: common-bytes.py: fix uneven line match --- common-bytes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-bytes.py b/common-bytes.py index 362203e..b1f41ba 100755 --- a/common-bytes.py +++ b/common-bytes.py @@ -15,9 +15,9 @@ def read_lines(files, line_width, lines_limit): for line in fileinput.input(files=files): lineno += 1 line = line.rstrip() - line_len = len(line) if line_width > 0: line = line[:line_width] + line_len = len(line) if line_width > 0 and line_len != line_width: print("Line {} has a different length {} (expected {})"\ .format(lineno, line_len, line_width), -- cgit v1.2.1