Skip to content

Commit 9eb0970

Browse files
committed
Merge pull request kubernetes#13091 from mesosphere/python-set-sort
Fix sort on sets in hack/verify-flags-underscore.py
2 parents 4e51cb2 + ce013e2 commit 9eb0970

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

hack/verify-flags-underscore.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,15 @@ def get_flags(rootdir, files):
162162
if len(new_excluded_flags) != 0:
163163
print("Found a flag declared with an _ but which is not explicitly listed as a valid flag name in hack/verify-flags/excluded-flags.txt")
164164
print("Are you certain this flag should not have been declared with an - instead?")
165-
new_excluded_flags.sort()
166-
print("%s" % "\n".join(new_excluded_flags))
165+
l = list(new_excluded_flags)
166+
l.sort()
167+
print("%s" % "\n".join(l))
167168
sys.exit(1)
168169
if len(new_flags) != 0:
169170
print("Found flags in golang files not in the list of known flags. Please add these to hack/verify-flags/known-flags.txt")
170-
new_flags.sort()
171-
print("%s" % "\n".join(new_flags))
171+
l = list(new_flags)
172+
l.sort()
173+
print("%s" % "\n".join(l))
172174
sys.exit(1)
173175
return list(flags)
174176

0 commit comments

Comments
 (0)