Fix grammer of some error messages (#3310)

This commit is contained in:
Stefan Agner 2021-11-17 15:41:35 +01:00 committed by GitHub
parent 88490140af
commit 7764decc37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 7 deletions

View File

@ -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)

View File

@ -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

View File

@ -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(

View File

@ -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

View File

@ -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()

View File

@ -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: