addBackcompatIndexes.py: 4 space indent instead of 6 for new index names; check previous line when deciding whether there are previous versions.

This commit is contained in:
Steve Rowe 2017-09-30 23:20:51 -04:00
parent 5afd41de11
commit 0e8d9411b0
2 changed files with 6 additions and 6 deletions

View File

@ -122,7 +122,7 @@ def update_backcompat_tests(types, index_version, current_version):
if self.start: if self.start:
# find where this version should exist # find where this version should exist
i = len(buffer) - 1 i = len(buffer) - 1
previous_version_exists = '};' not in line # Version list closure => there are no versions previous_version_exists = not ('};' in line and buffer[-1].strip().endswith("{"))
if previous_version_exists: # Only look if there is a version here if previous_version_exists: # Only look if there is a version here
v = find_version(buffer[i]) v = find_version(buffer[i])
while i >= self.start and v.on_or_after(index_version): while i >= self.start and v.on_or_after(index_version):