daemon: moved executable check to CoreEmu and separated them into their own module core.executables
This commit is contained in:
parent
c43dd60a42
commit
e0c9f9c832
13 changed files with 75 additions and 44 deletions
|
@ -33,7 +33,7 @@ from typing import (
|
|||
|
||||
import netaddr
|
||||
|
||||
from core.errors import CoreCommandError
|
||||
from core.errors import CoreCommandError, CoreError
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.emulator.session import Session
|
||||
|
@ -154,7 +154,7 @@ def which(command: str, required: bool) -> str:
|
|||
"""
|
||||
found_path = shutil.which(command)
|
||||
if found_path is None and required:
|
||||
raise ValueError(f"failed to find required executable({command}) in path")
|
||||
raise CoreError(f"failed to find required executable({command}) in path")
|
||||
return found_path
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue