From f6efb78b39397205e6e2741a275d38dc870df6cf Mon Sep 17 00:00:00 2001 From: sujinmkang Date: Wed, 31 Aug 2022 08:55:28 -0700 Subject: [PATCH 1/4] update the return for update_firmware api's failure case when the image file doesn't exist --- sonic_platform_base/component_base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sonic_platform_base/component_base.py b/sonic_platform_base/component_base.py index 120f02ccc..0dd65c63f 100644 --- a/sonic_platform_base/component_base.py +++ b/sonic_platform_base/component_base.py @@ -108,6 +108,9 @@ def update_firmware(self, image_path): Args: image_path: A string, path to firmware image + Returns: + False if image not found. + Raises: RuntimeError: update failed """ From 8fba3a2c4cdc8d08ad143c3c93e3c38c9204ea2f Mon Sep 17 00:00:00 2001 From: sujinmkang Date: Tue, 6 Sep 2022 11:03:54 -0700 Subject: [PATCH 2/4] update comments --- sonic_platform_base/component_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic_platform_base/component_base.py b/sonic_platform_base/component_base.py index 0dd65c63f..40561bae4 100644 --- a/sonic_platform_base/component_base.py +++ b/sonic_platform_base/component_base.py @@ -109,7 +109,7 @@ def update_firmware(self, image_path): image_path: A string, path to firmware image Returns: - False if image not found. + A boolean, False only if image_path was is not valid Raises: RuntimeError: update failed From f46b1580409d98239214301b56ae16e9769d84c9 Mon Sep 17 00:00:00 2001 From: sujinmkang Date: Wed, 7 Sep 2022 16:40:11 -0700 Subject: [PATCH 3/4] update comment --- sonic_platform_base/component_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonic_platform_base/component_base.py b/sonic_platform_base/component_base.py index 40561bae4..914b8505b 100644 --- a/sonic_platform_base/component_base.py +++ b/sonic_platform_base/component_base.py @@ -109,7 +109,8 @@ def update_firmware(self, image_path): image_path: A string, path to firmware image Returns: - A boolean, False only if image_path was is not valid + Boolean False if image_path doesn't exist instead of throwing an exception error + None when the update is successful Raises: RuntimeError: update failed From ae3f193dd02b07b104d5e4533599c2b8f0cfe074 Mon Sep 17 00:00:00 2001 From: sujinmkang Date: Fri, 9 Sep 2022 11:28:27 -0700 Subject: [PATCH 4/4] update comment --- sonic_platform_base/component_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic_platform_base/component_base.py b/sonic_platform_base/component_base.py index 914b8505b..8f3887f95 100644 --- a/sonic_platform_base/component_base.py +++ b/sonic_platform_base/component_base.py @@ -110,7 +110,7 @@ def update_firmware(self, image_path): Returns: Boolean False if image_path doesn't exist instead of throwing an exception error - None when the update is successful + Nothing when the update is successful Raises: RuntimeError: update failed