From: Jan Fajerski Date: Fri, 22 Nov 2019 14:49:41 +0000 (+0100) Subject: ceph-volume: py2 compatibility for selinux test X-Git-Tag: v13.2.9~103^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=194ac1f448c7fe91a43353e5fd65357f2a9ea0be;p=ceph.git ceph-volume: py2 compatibility for selinux test Fixes: af30c7f956380beb3bc4021d60b9229a82bda4e2 Signed-off-by: Jan Fajerski (cherry picked from commit 114aa57df28107c2d14caacdfb3f0423b244075d) --- 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 808048a6a9c05..f84d8691c6521 100644 --- a/src/ceph-volume/ceph_volume/tests/util/test_system.py +++ b/src/ceph-volume/ceph_volume/tests/util/test_system.py @@ -225,6 +225,13 @@ def stub_which(monkeypatch): return apply +# python2 has no FileNotFoundError +try: + FileNotFoundError +except NameError: + FileNotFoundError = OSError + + class TestSetContext(object): def setup(self):