summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch')
-rw-r--r--import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch54
1 files changed, 0 insertions, 54 deletions
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
deleted file mode 100644
index c53502b5d..000000000
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 7f542122d62b20d11198bfdb0f2c6a460261b5e7 Mon Sep 17 00:00:00 2001
-From: Jason Wessel <jason.wessel@windriver.com>
-Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH] Python3 compatibility: math error compatibility
-
-Commit 3fa5aa4294377e0f35267936d0c5caea3e61db48 from
-https://github.com/openvswitch/ovs.git
-
-The way math is handled with typing is completely different in python3.
-
-% python2<<EOF
-x=10
-y=8
-print((x + (y - 1)) / y * y)
-EOF
-16
-
-python3<<EOF
-x=10
-y=8
-print((x + (y - 1)) / y * y)
-EOF
-17.0
-
-So we need to force an integer for the round function as follows and
-maintain compatibility with python2.
-
-python3<<EOF
-x=10
-y=8
-print(int((x + (y - 1)) / y) * y)
-EOF
-16
-
-Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-Signed-off-by: Ben Pfaff <blp@ovn.org>
-
----
- build-aux/extract-ofp-actions | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
-index c7858bd..4d05ef9 100755
---- a/build-aux/extract-ofp-actions
-+++ b/build-aux/extract-ofp-actions
-@@ -35,7 +35,7 @@ line = ""
- arg_structs = set()
-
- def round_up(x, y):
-- return (x + (y - 1)) / y * y
-+ return int((x + (y - 1)) / y) * y
-
- def open_file(fn):
- global file_name
OpenPOWER on IntegriCloud