Skip to content

Commit ce013e2

Browse files
committed
Fix sort on sets in hack/verify-flags-underscore.py
1 parent 8800450 commit ce013e2

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
@@ -163,13 +163,15 @@ def get_flags(rootdir, files):
163163
if len(new_excluded_flags) != 0:
164164
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")
165165
print("Are you certain this flag should not have been declared with an - instead?")
166-
new_excluded_flags.sort()
167-
print("%s" % "\n".join(new_excluded_flags))
166+
l = list(new_excluded_flags)
167+
l.sort()
168+
print("%s" % "\n".join(l))
168169
sys.exit(1)
169170
if len(new_flags) != 0:
170171
print("Found flags in golang files not in the list of known flags. Please add these to hack/verify-flags/known-flags.txt")
171-
new_flags.sort()
172-
print("%s" % "\n".join(new_flags))
172+
l = list(new_flags)
173+
l.sort()
174+
print("%s" % "\n".join(l))
173175
sys.exit(1)
174176
return list(flags)
175177

0 commit comments

Comments
 (0)