ovs.db.data: Fix Atom.new()'s handling of Boolean values.
authorBen Pfaff <blp@nicira.com>
Thu, 15 Sep 2011 19:57:48 +0000 (12:57 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 23 Sep 2011 16:10:44 +0000 (09:10 -0700)
Boolean values have Boolean type, not real type.

This does not fix an actual bug because Atom.new() does not have existing
users.

python/ovs/db/data.py

index 7f07334927ed4a835809fb04baa6794c90b8c0f7..f62a562d08bbb03852cf4090c8caa04567c588b3 100644 (file)
@@ -212,7 +212,7 @@ class Atom(object):
         elif type(x) == float:
             t = ovs.db.types.RealType
         elif x in [False, True]:
-            t = ovs.db.types.RealType
+            t = ovs.db.types.BooleanType
         elif type(x) in [str, unicode]:
             t = ovs.db.types.StringType
         elif isinstance(x, uuid):