]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: py2 compatibility for selinux test
authorJan Fajerski <jfajerski@suse.com>
Fri, 22 Nov 2019 14:49:41 +0000 (15:49 +0100)
committerJan Fajerski <jfajerski@suse.com>
Fri, 22 Nov 2019 14:49:41 +0000 (15:49 +0100)
Fixes: af30c7f956380beb3bc4021d60b9229a82bda4e2
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
src/ceph-volume/ceph_volume/tests/util/test_system.py

index ab4431295791e993d9ea2746396d87a3f3bc4a09..4073cf381da6ccd82ef78ca4a52122bd158bb5bd 100644 (file)
@@ -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):