提交 cbaacf58 编写于 作者: C Cleber Rosa

selftests/unit/test_utils_partition.py: also treat raised OSError

When skipping tests due to the lack of sudo permissions, OSError
can be raised when the asked binary does not exist and can not be
executed.

In an ideal world, only one "skip" decorator would have to run, and
this extra treatment wouldn't be necessary since there's already a
`missing_binary` being used.  Unfortunately, that's not how they work.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 3a1a8f70
......@@ -33,7 +33,7 @@ def cannot_sudo(command):
try:
process.run(command, sudo=True)
False
except process.CmdError:
except (process.CmdError, OSError):
return True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册