Refactor metaval tool-info module for less indents
@@ -96,15 +96,14 @@ class Tool(benchexec.tools.template.BaseTool2):
"benchexec.tools." + verifierName, fromlist=["Tool"]
).Tool()
- if verifierName in self.wrappedTools:
+ if not verifierName in self.wrappedTools:
+ sys.exit("ERROR: Could not find wrapped tool") # noqa: R503 always raises
tool = self.wrappedTools[verifierName]
assert isinstance(
tool, BaseTool2
), "we expect that all wrapped tools extend BaseTool2"
wrapped_executable = tool.executable(
- BaseTool2.ToolLocator(
- tool_directory=self.TOOL_TO_PATH_MAP[verifierName]
- )
+ BaseTool2.ToolLocator(tool_directory=self.TOOL_TO_PATH_MAP[verifierName])
)
wrappedOptions = tool.cmdline(
wrapped_executable,
@@ -127,8 +126,6 @@ class Tool(benchexec.tools.template.BaseTool2):
+ ["--"]
+ wrappedOptions
)
- else:
- sys.exit("ERROR: Could not find wrapped tool") # noqa: R503 always raises
def version(self, executable):
stdout = self._version_from_tool(executable, "--version")
