Fix and upgrade minio integration (#84545)

closes https://github.com/home-assistant/core/issues/79842
This commit is contained in:
Tomas Kislan
2022-12-29 14:16:06 +01:00
committed by GitHub
parent bfdca4b274
commit 1dec6854e5
5 changed files with 8 additions and 8 deletions

View File

@ -136,8 +136,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
file_path = _render_service_value(service, ATTR_FILE_PATH)
if not hass.config.is_allowed_path(file_path):
_LOGGER.error("Invalid file_path %s", file_path)
return
raise ValueError(f"Invalid file_path {file_path}")
minio_client.fput_object(bucket, key, file_path)
@ -148,8 +147,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
file_path = _render_service_value(service, ATTR_FILE_PATH)
if not hass.config.is_allowed_path(file_path):
_LOGGER.error("Invalid file_path %s", file_path)
return
raise ValueError(f"Invalid file_path {file_path}")
minio_client.fget_object(bucket, key, file_path)

View File

@ -2,7 +2,7 @@
"domain": "minio",
"name": "Minio",
"documentation": "https://www.home-assistant.io/integrations/minio",
"requirements": ["minio==5.0.10"],
"requirements": ["minio==7.1.12"],
"codeowners": ["@tkislan"],
"iot_class": "cloud_push",
"loggers": ["minio"]

View File

@ -34,7 +34,9 @@ def create_minio_client(
endpoint: str, access_key: str, secret_key: str, secure: bool
) -> Minio:
"""Create Minio client."""
return Minio(endpoint, access_key, secret_key, secure)
return Minio(
endpoint=endpoint, access_key=access_key, secret_key=secret_key, secure=secure
)
def get_minio_notification_response(

View File

@ -1110,7 +1110,7 @@ mill-local==0.2.0
millheater==0.10.0
# homeassistant.components.minio
minio==5.0.10
minio==7.1.12
# homeassistant.components.moat
moat-ble==0.1.1

View File

@ -812,7 +812,7 @@ mill-local==0.2.0
millheater==0.10.0
# homeassistant.components.minio
minio==5.0.10
minio==7.1.12
# homeassistant.components.moat
moat-ble==0.1.1