diff options
Diffstat (limited to 'recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch')
-rw-r--r-- | recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch b/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch new file mode 100644 index 00000000..ddc86db2 --- /dev/null +++ b/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From 0f318e472d9897d99395adcfb17cbeaff05677ba Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wessel <jason.wessel@windriver.com> | ||
3 | Date: Thu, 29 Jun 2017 20:33:23 -0700 | ||
4 | Subject: [PATCH 4/8] Python3 compatibility: iteritems to items | ||
5 | |||
6 | Commit 4ab665623cbb4c6506e48b82e0c9fe8585f42e13 from | ||
7 | https://github.com/openvswitch/ovs.git | ||
8 | |||
9 | Allow compability with python3 and python2 by changing iteritems() to | ||
10 | items(). | ||
11 | |||
12 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
13 | Signed-off-by: Ben Pfaff <blp@ovn.org> | ||
14 | --- | ||
15 | build-aux/extract-ofp-actions | 2 +- | ||
16 | build-aux/extract-ofp-errors | 2 +- | ||
17 | build-aux/extract-ofp-fields | 2 +- | ||
18 | ovsdb/ovsdb-idlc.in | 8 ++++---- | ||
19 | 4 files changed, 7 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions | ||
22 | index 874e6b4..c11297c 100755 | ||
23 | --- a/build-aux/extract-ofp-actions | ||
24 | +++ b/build-aux/extract-ofp-actions | ||
25 | @@ -13,7 +13,7 @@ version_map = {"1.0": 0x01, | ||
26 | "1.3": 0x04, | ||
27 | "1.4": 0x05, | ||
28 | "1.5": 0x06} | ||
29 | -version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems()) | ||
30 | +version_reverse_map = dict((v, k) for (k, v) in version_map.items()) | ||
31 | |||
32 | # Map from vendor name to the length of the action header. | ||
33 | vendor_map = {"OF": (0x00000000, 4), | ||
34 | diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors | ||
35 | index 336a240..71ae0bd 100755 | ||
36 | --- a/build-aux/extract-ofp-errors | ||
37 | +++ b/build-aux/extract-ofp-errors | ||
38 | @@ -14,7 +14,7 @@ version_map = {"1.0": 0x01, | ||
39 | "1.4": 0x05, | ||
40 | "1.5": 0x06, | ||
41 | "1.6": 0x07} | ||
42 | -version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems()) | ||
43 | +version_reverse_map = dict((v, k) for (k, v) in version_map.items()) | ||
44 | |||
45 | token = None | ||
46 | line = "" | ||
47 | diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields | ||
48 | index 61e752b..ef997dd 100755 | ||
49 | --- a/build-aux/extract-ofp-fields | ||
50 | +++ b/build-aux/extract-ofp-fields | ||
51 | @@ -16,7 +16,7 @@ VERSION = {"1.0": 0x01, | ||
52 | "1.3": 0x04, | ||
53 | "1.4": 0x05, | ||
54 | "1.5": 0x06} | ||
55 | -VERSION_REVERSE = dict((v,k) for k, v in VERSION.iteritems()) | ||
56 | +VERSION_REVERSE = dict((v,k) for k, v in VERSION.items()) | ||
57 | |||
58 | TYPES = {"u8": (1, False), | ||
59 | "be16": (2, False), | ||
60 | diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in | ||
61 | index 3fa1a0f..615548f 100755 | ||
62 | --- a/ovsdb/ovsdb-idlc.in | ||
63 | +++ b/ovsdb/ovsdb-idlc.in | ||
64 | @@ -138,7 +138,7 @@ def printCIDLHeader(schemaFile): | ||
65 | #include "smap.h" | ||
66 | #include "uuid.h"''' % {'prefix': prefix.upper()}) | ||
67 | |||
68 | - for tableName, table in sorted(schema.tables.iteritems()): | ||
69 | + for tableName, table in sorted(schema.tables.items()): | ||
70 | structName = "%s%s" % (prefix, tableName.lower()) | ||
71 | |||
72 | print("") | ||
73 | @@ -300,7 +300,7 @@ def printCIDLSource(schemaFile): | ||
74 | ''' % schema.idlHeader) | ||
75 | |||
76 | # Cast functions. | ||
77 | - for tableName, table in sorted(schema.tables.iteritems()): | ||
78 | + for tableName, table in sorted(schema.tables.items()): | ||
79 | structName = "%s%s" % (prefix, tableName.lower()) | ||
80 | print(''' | ||
81 | static struct %(s)s * | ||
82 | @@ -311,7 +311,7 @@ static struct %(s)s * | ||
83 | ''' % {'s': structName}) | ||
84 | |||
85 | |||
86 | - for tableName, table in sorted(schema.tables.iteritems()): | ||
87 | + for tableName, table in sorted(schema.tables.items()): | ||
88 | structName = "%s%s" % (prefix, tableName.lower()) | ||
89 | print("") | ||
90 | print("/* %s table. */" % (tableName)) | ||
91 | @@ -1025,7 +1025,7 @@ void | ||
92 | # Table classes. | ||
93 | print("") | ||
94 | print("struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper())) | ||
95 | - for tableName, table in sorted(schema.tables.iteritems()): | ||
96 | + for tableName, table in sorted(schema.tables.items()): | ||
97 | structName = "%s%s" % (prefix, tableName.lower()) | ||
98 | if table.is_root: | ||
99 | is_root = "true" | ||
100 | -- | ||
101 | 2.5.0 | ||
102 | |||