From b1d8d7c353e73ba4488874c926c66eae663098ce Mon Sep 17 00:00:00 2001 From: seolmin Date: Thu, 21 Mar 2024 11:05:40 +0900 Subject: [PATCH] fix: modify memory allocated logic in cloud functions service --- .../manager/cloud_functions/function_gen2_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spaceone/inventory/manager/cloud_functions/function_gen2_manager.py b/src/spaceone/inventory/manager/cloud_functions/function_gen2_manager.py index 056e63f..05428c0 100644 --- a/src/spaceone/inventory/manager/cloud_functions/function_gen2_manager.py +++ b/src/spaceone/inventory/manager/cloud_functions/function_gen2_manager.py @@ -280,13 +280,13 @@ def _make_timeout(timeout): @staticmethod def _make_memory_allocated(memory): try: - number, unit = memory.split("Mi") + number, *unit = memory.split("Mi") return f"{number} MiB" except ValueError: - number, unit = memory.split("M") + number, *unit = memory.split("M") return f"{number} MiB" except Exception: - number, unit = memory.split("Gi") + number, *unit = memory.split("Gi") return f"{number} GiB" @staticmethod