From: Patrick Donnelly Date: Fri, 21 Jan 2022 19:01:22 +0000 (-0500) Subject: teuthology/test: use correct exception type X-Git-Tag: 1.2.0~170^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bd713e93db0ae980c7c56c16c6d4b241ad9dd837;p=teuthology.git teuthology/test: use correct exception type Signed-off-by: Patrick Donnelly --- diff --git a/teuthology/test/fake_fs.py b/teuthology/test/fake_fs.py index 5432d4141..c5cb6e4f0 100644 --- a/teuthology/test/fake_fs.py +++ b/teuthology/test/fake_fs.py @@ -64,8 +64,7 @@ def make_fake_fstools(fake_filesystem): subdict = fsdict for component in components: if component not in subdict: - raise FileNotFoundError( - '[Errno 2] No such file or directory: %s' % component) + raise FileNotFoundError('[Errno 2] No such file or directory: %s' % component) subdict = subdict.get(component) return subdict is None or isinstance(subdict, str) @@ -80,8 +79,7 @@ def make_fake_fstools(fake_filesystem): subdict = fake_filesystem for component in components: if component not in subdict: - raise IOError( - '[Errno 2] No such file or directory: %s' % component) + raise FileNotFoundError('[Errno 2] No such file or directory: %s' % component) subdict = subdict.get(component) if isinstance(subdict, dict): raise IOError('[Errno 21] Is a directory: %s' % path)