[ovs-dev] [PATCH] ovsdb-doc: Be less explicit in ovs-vswitchd.conf.db(5).

Ben Pfaff blp at nicira.com
Wed Sep 1 22:12:36 UTC 2010


The documentation doesn't really need to say that a field may be "between
0 and 4294967295 characters long".

This regression was introduced by commit 991559357 "Implement initial
Python bindings for Open vSwitch database."
---
 python/ovs/db/types.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py
index 6e7ef11..d42ac7f 100644
--- a/python/ovs/db/types.py
+++ b/python/ovs/db/types.py
@@ -290,14 +290,14 @@ class BaseType(object):
                 return 'at most %s' % commafy(self.max)
             else:
                 return 'at most %g' % self.max
-        elif self.min_length is not None and self.max_length is not None:
+        elif self.min_length != 0 and self.max_length != sys.maxint:
             if self.min_length == self.max_length:
                 return 'exactly %d characters long' % (self.min_length)
             else:
                 return 'between %d and %d characters long' % (self.min_length, self.max_length)
-        elif self.min_length is not None:
+        elif self.min_length != 0:
             return 'at least %d characters long' % self.min_length
-        elif self.max_length is not None:
+        elif self.max_length != sys.maxint:
             return 'at most %d characters long' % self.max_length
         else:
             return ''
-- 
1.7.1





More information about the dev mailing list