Skip to content

Commit 90c4f74

Browse files
committed
Remove message_template
1 parent a357411 commit 90c4f74

8 files changed

+0
-9
lines changed

aiohasupervisor/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ async def _raise_on_status(self, response: ClientResponse) -> None:
7878
exc_type = ERROR_KEYS[result.error_key]
7979
raise exc_type(
8080
result.message,
81-
result.message_template,
8281
result.extra_fields,
8382
result.job_id,
8483
)

aiohasupervisor/exceptions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class SupervisorError(Exception):
1313
def __init__(
1414
self,
1515
message: str | None = None,
16-
message_template: str | None = None,
1716
extra_fields: dict[str, Any] | None = None,
1817
job_id: str | None = None,
1918
) -> None:
@@ -24,7 +23,6 @@ def __init__(
2423
super().__init__()
2524

2625
self.job_id = job_id
27-
self.message_template = message_template
2826
self.extra_fields = extra_fields
2927

3028

aiohasupervisor/models/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class Response(DataClassORJSONMixin):
8585
message: str | None = None
8686
job_id: str | None = None
8787
error_key: str | None = None
88-
message_template: str | None = None
8988
extra_fields: dict[str, Any] | None = None
9089

9190

tests/fixtures/store_addon_availability_error_architecture.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"result": "error",
33
"message": "Add-on core_mosquitto not supported on this platform, supported architectures: i386",
44
"error_key": "addon_not_supported_architecture_error",
5-
"message_template": "Add-on {slug} not supported on this platform, supported architectures: {architectures}",
65
"extra_fields": {
76
"slug": "core_mosquitto",
87
"architectures": "i386"

tests/fixtures/store_addon_availability_error_home_assistant.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"result": "error",
33
"message": "Add-on core_mosquitto not supported on this system, requires Home Assistant version 2023.1.1 or greater",
44
"error_key": "addon_not_supported_home_assistant_version_error",
5-
"message_template": "Add-on {slug} not supported on this system, requires Home Assistant version {version} or greater",
65
"extra_fields": {
76
"slug": "core_mosquitto",
87
"version": "2023.1.1"

tests/fixtures/store_addon_availability_error_machine.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"result": "error",
33
"message": "Add-on core_mosquitto not supported on this machine, supported machine types: odroid-n2",
44
"error_key": "addon_not_supported_machine_type_error",
5-
"message_template": "Add-on {slug} not supported on this machine, supported machine types: {machine_types}",
65
"extra_fields": {
76
"slug": "core_mosquitto",
87
"machine_types": "odroid-n2"

tests/fixtures/store_addon_availability_error_other.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"result": "error",
33
"message": "Add-on core_mosquitto not supported on this system, requires <something new> to be <something else>",
44
"error_key": "addon_not_supported_other_error",
5-
"message_template": "Add-on {slug} not supported on this system, requires <something new> to be {requirement}",
65
"extra_fields": {
76
"slug": "core_mosquitto",
87
"requirement": "<something else>"

tests/test_store.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ async def test_store_addon_availability_error(
227227

228228
def check_availability_error(err: SupervisorError) -> bool:
229229
assert err.error_key == error_key
230-
assert err.message_template == error_data["message_template"]
231230
assert err.extra_fields == error_data["extra_fields"]
232231
return True
233232

0 commit comments

Comments
 (0)