mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-26 18:46:29 +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)
|
store = self.store.get(slug)
|
||||||
|
|
||||||
if not store:
|
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:
|
if not store.available:
|
||||||
raise AddonsNotSupportedError(
|
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)
|
self.data.install(store)
|
||||||
|
@ -167,7 +167,7 @@ class AddonOptions(CoreSysAttributes):
|
|||||||
device = self.sys_hardware.get_by_path(Path(value))
|
device = self.sys_hardware.get_by_path(Path(value))
|
||||||
except HardwareNotFound:
|
except HardwareNotFound:
|
||||||
raise vol.Invalid(
|
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
|
) from None
|
||||||
|
|
||||||
# Have filter
|
# Have filter
|
||||||
|
@ -155,7 +155,7 @@ class DockerAPI:
|
|||||||
)
|
)
|
||||||
except docker_errors.NotFound as err:
|
except docker_errors.NotFound as err:
|
||||||
raise DockerNotFound(
|
raise DockerNotFound(
|
||||||
f"Image {image} not exists for {name}", _LOGGER.error
|
f"Image {image}:{tag} does not exist for {name}", _LOGGER.error
|
||||||
) from err
|
) from err
|
||||||
except docker_errors.DockerException as err:
|
except docker_errors.DockerException as err:
|
||||||
raise DockerAPIError(
|
raise DockerAPIError(
|
||||||
|
@ -45,7 +45,7 @@ class HomeAssistantSecrets(CoreSysAttributes):
|
|||||||
async def _read_secrets(self):
|
async def _read_secrets(self):
|
||||||
"""Read secrets.yaml into memory."""
|
"""Read secrets.yaml into memory."""
|
||||||
if not self.path_secrets.exists():
|
if not self.path_secrets.exists():
|
||||||
_LOGGER.debug("Home Assistant secrets not exists")
|
_LOGGER.debug("Home Assistant secrets.yaml does not exist")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Read secrets
|
# Read secrets
|
||||||
|
@ -82,7 +82,9 @@ class MQTTService(ServiceInterface):
|
|||||||
def del_service_data(self, addon: Addon) -> None:
|
def del_service_data(self, addon: Addon) -> None:
|
||||||
"""Remove the data from service object."""
|
"""Remove the data from service object."""
|
||||||
if not self.enabled:
|
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._data.clear()
|
||||||
self.save()
|
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}.*"):
|
for file in path.glob(f"**/{filename}.*"):
|
||||||
if file.suffix in filetypes:
|
if file.suffix in filetypes:
|
||||||
return file
|
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:
|
def read_json_or_yaml_file(path: Path) -> dict:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user