[ovs-dev] [python 19/31] ovs.db.types: Use toAtomicType() instead of open-coding it.
Ben Pfaff
blp at nicira.com
Tue Aug 23 21:05:13 UTC 2011
Suggested-by: Reid Price <reid at nicira.com>
---
python/ovs/db/types.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py
index 416d745..5f50d65 100644
--- a/python/ovs/db/types.py
+++ b/python/ovs/db/types.py
@@ -337,8 +337,8 @@ class BaseType(object):
def cInitBaseType(self, indent, var):
stmts = []
- stmts.append('ovsdb_base_type_init(&%s, OVSDB_TYPE_%s);' % (
- var, self.type.to_string().upper()),)
+ stmts.append('ovsdb_base_type_init(&%s, %s);' % (
+ var, self.toAtomicType()))
if self.enum:
stmts.append("%s.enum_ = xmalloc(sizeof *%s.enum_);"
% (var, var))
--
1.7.4.4
More information about the dev
mailing list