diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/sort.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/sort.py b/contrib/sort.py index 6f21370ec..0758d5fec 100755 --- a/contrib/sort.py +++ b/contrib/sort.py | |||
@@ -53,7 +53,7 @@ def fix_profile(filename): | |||
53 | lines = profile.read().split("\n") | 53 | lines = profile.read().split("\n") |
54 | was_fixed = False | 54 | was_fixed = False |
55 | fixed_profile = [] | 55 | fixed_profile = [] |
56 | for lineno, line in enumerate(lines): | 56 | for lineno, line in enumerate(lines, 1): |
57 | if line[:12] in ("private-bin ", "private-etc ", "private-lib "): | 57 | if line[:12] in ("private-bin ", "private-etc ", "private-lib "): |
58 | fixed_line = f"{line[:12]}{sort_alphabetical(line[12:])}" | 58 | fixed_line = f"{line[:12]}{sort_alphabetical(line[12:])}" |
59 | elif line[:13] in ("seccomp.drop ", "seccomp.keep "): | 59 | elif line[:13] in ("seccomp.drop ", "seccomp.keep "): |
@@ -69,8 +69,8 @@ def fix_profile(filename): | |||
69 | if fixed_line != line: | 69 | if fixed_line != line: |
70 | was_fixed = True | 70 | was_fixed = True |
71 | print( | 71 | print( |
72 | f"{filename}:{lineno + 1}:-{line}\n" | 72 | f"{filename}:{lineno}:-{line}\n" |
73 | f"{filename}:{lineno + 1}:+{fixed_line}" | 73 | f"{filename}:{lineno}:+{fixed_line}" |
74 | ) | 74 | ) |
75 | fixed_profile.append(fixed_line) | 75 | fixed_profile.append(fixed_line) |
76 | if was_fixed: | 76 | if was_fixed: |