summaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2017-06-29 20:33:23 -0700
committerBen Pfaff <blp@ovn.org>2017-07-06 14:06:08 -0700
commit4ab665623cbb4c6506e48b82e0c9fe8585f42e13 (patch)
tree37a14af6804042ebc02cbae9b86ebc3008e02c37 /ovsdb
parenta4d10a7ca937d73873f6f98619d88682e69f5dbe (diff)
downloadopenvswitch-4ab665623cbb4c6506e48b82e0c9fe8585f42e13.tar.gz
Python3 compatibility: iteritems to items
Allow compability with python3 and python2 by changing iteritems() to items(). Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb')
-rwxr-xr-xovsdb/ovsdb-idlc.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index 3fa1a0f1a..615548f12 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -138,7 +138,7 @@ def printCIDLHeader(schemaFile):
#include "smap.h"
#include "uuid.h"''' % {'prefix': prefix.upper()})
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
print(" ")
@@ -300,7 +300,7 @@ def printCIDLSource(schemaFile):
''' % schema.idlHeader)
# Cast functions.
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
print('''
static struct %(s)s *
@@ -311,7 +311,7 @@ static struct %(s)s *
''' % {'s': structName})
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
print(" ")
print("/* %s table. */" % (tableName))
@@ -1025,7 +1025,7 @@ void
# Table classes.
print(" ")
print("struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper()))
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
if table.is_root:
is_root = "true"