From: Jan Fajerski Date: Fri, 22 Nov 2019 14:49:41 +0000 (+0100) Subject: ceph-volume: py2 compatibility for selinux test X-Git-Tag: v15.1.0~794^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=114aa57df28107c2d14caacdfb3f0423b244075d;p=ceph.git ceph-volume: py2 compatibility for selinux test Fixes: af30c7f956380beb3bc4021d60b9229a82bda4e2 Signed-off-by: Jan Fajerski --- 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 ab4431295791..4073cf381da6 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):