diff options
author | Matt Schmoyer <mattschmo@gmail.com> | 2016-10-01 11:36:58 -0400 |
---|---|---|
committer | Matt Schmoyer <mattschmo@gmail.com> | 2016-10-01 11:36:58 -0400 |
commit | 616eb83bbabe44d4a7034bcd377d6ee42806c171 (patch) | |
tree | a2267209d8dc10e3ba0c76639eab67ea127f9d74 /python/tidy/servo_tidy/tidy.py | |
parent | d9f53cb14df4467de714e61f9a5ab4b4a510f5f5 (diff) | |
download | servo-616eb83bbabe44d4a7034bcd377d6ee42806c171.tar.gz servo-616eb83bbabe44d4a7034bcd377d6ee42806c171.zip |
Avoid unecessary loop evaluation on empty lines for tidy check_license
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 30327559e3a..410c0af7ac3 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -149,8 +149,9 @@ def check_license(file_name, lines): l = l.rstrip('\n') if not l.strip(): blank_lines += 1 - if blank_lines >= max_blank_lines: - break + if blank_lines >= max_blank_lines: + break + continue line = uncomment(l) if line is not None: license_block.append(line) |