diff mbox

[ovs-dev] ovsdb: Print enum elements for man pages in alphabetical order.

Message ID 1487120111-82025-1-git-send-email-jpettit@ovn.org
State Accepted
Headers show

Commit Message

Justin Pettit Feb. 15, 2017, 12:55 a.m. UTC
The previous behavior printed them in a pseudorandom order, which made
them look odd in man pages.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
---
 python/ovs/db/types.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff Feb. 15, 2017, 4:50 a.m. UTC | #1
On Tue, Feb 14, 2017 at 04:55:11PM -0800, Justin Pettit wrote:
> The previous behavior printed them in a pseudorandom order, which made
> them look odd in man pages.
> 
> Signed-off-by: Justin Pettit <jpettit@ovn.org>

Assuming it builds:

Acked-by: Ben Pfaff <blp@ovn.org>
Justin Pettit Feb. 15, 2017, 7:16 a.m. UTC | #2
> On Feb 14, 2017, at 8:50 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> On Tue, Feb 14, 2017 at 04:55:11PM -0800, Justin Pettit wrote:
>> The previous behavior printed them in a pseudorandom order, which made
>> them look odd in man pages.
>> 
>> Signed-off-by: Justin Pettit <jpettit@ovn.org>
> 
> Assuming it builds:
> 
> Acked-by: Ben Pfaff <blp@ovn.org>

Pushed.  Thanks.

--Justin
diff mbox

Patch

diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py
index 78d5fcd..50eb505 100644
--- a/python/ovs/db/types.py
+++ b/python/ovs/db/types.py
@@ -296,6 +296,7 @@  class BaseType(object):
         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: