From 114aa57df28107c2d14caacdfb3f0423b244075d Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Fri, 22 Nov 2019 15:49:41 +0100 Subject: [PATCH] ceph-volume: py2 compatibility for selinux test Fixes: af30c7f956380beb3bc4021d60b9229a82bda4e2 Signed-off-by: Jan Fajerski --- src/ceph-volume/ceph_volume/tests/util/test_system.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ceph-volume/ceph_volume/tests/util/test_system.py b/src/ceph-volume/ceph_volume/tests/util/test_system.py index ab443129579..4073cf381da 100644 --- a/src/ceph-volume/ceph_volume/tests/util/test_system.py +++ b/src/ceph-volume/ceph_volume/tests/util/test_system.py @@ -226,6 +226,13 @@ def stub_which(monkeypatch): return apply +# python2 has no FileNotFoundError +try: + FileNotFoundError +except NameError: + FileNotFoundError = OSError + + class TestSetContext(object): def setup(self): -- 2.39.5