mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +00:00
Fix grammer of some error messages (#3310)
This commit is contained in:
parent
88490140af
commit
7764decc37
@ -158,11 +158,11 @@ class AddonManager(CoreSysAttributes):
|
||||
store = self.store.get(slug)
|
||||
|
||||
if not store:
|
||||
raise AddonsError(f"Add-on {slug} not exists", _LOGGER.error)
|
||||
raise AddonsError(f"Add-on {slug} does not exist", _LOGGER.error)
|
||||
|
||||
if not store.available:
|
||||
raise AddonsNotSupportedError(
|
||||
f"Add-on {slug} not supported on that platform", _LOGGER.error
|
||||
f"Add-on {slug} not supported on this platform", _LOGGER.error
|
||||
)
|
||||
|
||||
self.data.install(store)
|
||||
|
@ -167,7 +167,7 @@ class AddonOptions(CoreSysAttributes):
|
||||
device = self.sys_hardware.get_by_path(Path(value))
|
||||
except HardwareNotFound:
|
||||
raise vol.Invalid(
|
||||
f"Device '{value}' does not exists! in {self._name} ({self._slug})"
|
||||
f"Device '{value}' does not exist in {self._name} ({self._slug})"
|
||||
) from None
|
||||
|
||||
# Have filter
|
||||
|
@ -155,7 +155,7 @@ class DockerAPI:
|
||||
)
|
||||
except docker_errors.NotFound as err:
|
||||
raise DockerNotFound(
|
||||
f"Image {image} not exists for {name}", _LOGGER.error
|
||||
f"Image {image}:{tag} does not exist for {name}", _LOGGER.error
|
||||
) from err
|
||||
except docker_errors.DockerException as err:
|
||||
raise DockerAPIError(
|
||||
|
@ -45,7 +45,7 @@ class HomeAssistantSecrets(CoreSysAttributes):
|
||||
async def _read_secrets(self):
|
||||
"""Read secrets.yaml into memory."""
|
||||
if not self.path_secrets.exists():
|
||||
_LOGGER.debug("Home Assistant secrets not exists")
|
||||
_LOGGER.debug("Home Assistant secrets.yaml does not exist")
|
||||
return
|
||||
|
||||
# Read secrets
|
||||
|
@ -82,7 +82,9 @@ class MQTTService(ServiceInterface):
|
||||
def del_service_data(self, addon: Addon) -> None:
|
||||
"""Remove the data from service object."""
|
||||
if not self.enabled:
|
||||
raise ServicesError("Can't remove not exists services", _LOGGER.warning)
|
||||
raise ServicesError(
|
||||
"Can't remove nonexistent service data", _LOGGER.warning
|
||||
)
|
||||
|
||||
self._data.clear()
|
||||
self.save()
|
||||
|
@ -20,7 +20,7 @@ def find_one_filetype(path: Path, filename: str, filetypes: list[str]) -> Path:
|
||||
for file in path.glob(f"**/{filename}.*"):
|
||||
if file.suffix in filetypes:
|
||||
return file
|
||||
raise ConfigurationFileError(f"{path!s}/{filename}.({filetypes}) not exists!")
|
||||
raise ConfigurationFileError(f"{path!s}/{filename}.({filetypes}) does not exist!")
|
||||
|
||||
|
||||
def read_json_or_yaml_file(path: Path) -> dict:
|
||||
|
Loading…
x
Reference in New Issue
Block a user