diff options
Diffstat (limited to 'recipes-networking/openvswitch/openvswitch-git/ovsdb-idlc.in-fix-dict-change-during-iteration.patch')
-rw-r--r-- | recipes-networking/openvswitch/openvswitch-git/ovsdb-idlc.in-fix-dict-change-during-iteration.patch | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/ovsdb-idlc.in-fix-dict-change-during-iteration.patch b/recipes-networking/openvswitch/openvswitch-git/ovsdb-idlc.in-fix-dict-change-during-iteration.patch deleted file mode 100644 index bf49ff65..00000000 --- a/recipes-networking/openvswitch/openvswitch-git/ovsdb-idlc.in-fix-dict-change-during-iteration.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From d84109f0b60096ce71cd0537b31b69a7f5ea8756 Mon Sep 17 00:00:00 2001 | ||
2 | From: Flavio Leitner <fbl@sysclose.org> | ||
3 | Date: Sat, 14 Sep 2019 20:17:28 -0300 | ||
4 | Subject: [PATCH] ovsdb-idlc.in: fix dict change during iteration. | ||
5 | |||
6 | Commit d84109f0b600 from git://github.com/openvswitch/ovs.git | ||
7 | |||
8 | Python3 complains if a dict key is changed during the | ||
9 | iteration. | ||
10 | |||
11 | Use list() to create a copy of it. | ||
12 | |||
13 | Traceback (most recent call last): | ||
14 | File "./ovsdb/ovsdb-idlc.in", line 1581, in <module> | ||
15 | func(*args[1:]) | ||
16 | File "./ovsdb/ovsdb-idlc.in", line 185, in printCIDLHeader | ||
17 | replace_cplusplus_keyword(schema) | ||
18 | File "./ovsdb/ovsdb-idlc.in", line 179, in replace_cplusplus_keyword | ||
19 | for columnName in table.columns: | ||
20 | RuntimeError: dictionary keys changed during iteration | ||
21 | |||
22 | Signed-off-by: Flavio Leitner <fbl@sysclose.org> | ||
23 | Signed-off-by: Ben Pfaff <blp@ovn.org> | ||
24 | [MA: Upstream-Status: Submitted] | ||
25 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
26 | --- | ||
27 | ovsdb/ovsdb-idlc.in | 2 +- | ||
28 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
29 | |||
30 | diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in | ||
31 | index 40fef39..22d0a4e 100755 | ||
32 | --- a/ovsdb/ovsdb-idlc.in | ||
33 | +++ b/ovsdb/ovsdb-idlc.in | ||
34 | @@ -176,7 +176,7 @@ def replace_cplusplus_keyword(schema): | ||
35 | 'wchar_t', 'while', 'xor', 'xor_eq'} | ||
36 | |||
37 | for tableName, table in schema.tables.items(): | ||
38 | - for columnName in table.columns: | ||
39 | + for columnName in list(table.columns): | ||
40 | if columnName in keywords: | ||
41 | table.columns[columnName + '_'] = table.columns.pop(columnName) | ||
42 | |||
43 | -- | ||
44 | 2.7.4 | ||
45 | |||