Skip to content

Commit

Permalink
ovsdb: Print enum elements for man pages in alphabetical order.
Browse files Browse the repository at this point in the history
The previous behavior printed them in a pseudorandom order, which made
them look odd in man pages.

Signed-off-by: Justin Pettit <[email protected]>
  • Loading branch information
justinpettit committed Feb 15, 2017
1 parent 70969b0 commit 9948793
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/ovs/db/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def constraintsToEnglish(self, escapeLiteral=returnUnchanged,
if self.enum:
literals = [value.toEnglish(escapeLiteral)
for value in self.enum.values]
literals.sort()
if len(literals) == 1:
english = 'must be %s' % (literals[0])
elif len(literals) == 2:
Expand Down

0 comments on commit 9948793

Please sign in to comment.