diff options
Diffstat (limited to 'recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch')
-rw-r--r-- | recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch b/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch new file mode 100644 index 00000000..a85980ed --- /dev/null +++ b/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 9cbae86be03756df76560c15720756f9ac088144 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 3/8] Python3 compatibility: execfile to exec | ||
5 | |||
6 | Commit a4d10a7ca937d73873f6f98619d88682e69f5dbe from | ||
7 | https://github.com/openvswitch/ovs.git | ||
8 | |||
9 | Allow compability with python3 and python2 by changing execfile() to | ||
10 | exec(). | ||
11 | |||
12 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
13 | Signed-off-by: Ben Pfaff <blp@ovn.org> | ||
14 | --- | ||
15 | ovsdb/ovsdb-idlc.in | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in | ||
19 | index 8b85f0d..3fa1a0f 100755 | ||
20 | --- a/ovsdb/ovsdb-idlc.in | ||
21 | +++ b/ovsdb/ovsdb-idlc.in | ||
22 | @@ -17,7 +17,7 @@ def parseSchema(filename): | ||
23 | |||
24 | def annotateSchema(schemaFile, annotationFile): | ||
25 | schemaJson = ovs.json.from_file(schemaFile) | ||
26 | - execfile(annotationFile, globals(), {"s": schemaJson}) | ||
27 | + exec(compile(open(annotationFile, "rb").read(), annotationFile, 'exec'), globals(), {"s": schemaJson}) | ||
28 | ovs.json.to_stream(schemaJson, sys.stdout) | ||
29 | sys.stdout.write('\n') | ||
30 | |||
31 | -- | ||
32 | 2.5.0 | ||
33 | |||