From 3e46c542e26b1cbc4dde045270fffab688c300fd Mon Sep 17 00:00:00 2001 From: PeterTSW-EC Date: Tue, 16 Jul 2024 10:28:35 +0800 Subject: [PATCH] [Bug] SONiC Extension Packages Migration Error During New SONiC Image Install * In 17/05/2023, SONiC updates the format of CLI section in the manifest.json. * The implementation was updated in 202311 or later branches. * However, the PR #2753 reported there is a error occur when the CLI migration. * The root cause is occurred while a CLI field (show/config/clear) is empty (''). * This PR modifies the parser of the cli_plugins field in the manifest.py. --- sonic_package_manager/manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic_package_manager/manifest.py b/sonic_package_manager/manifest.py index 865db7ef..f18b9a7f 100644 --- a/sonic_package_manager/manifest.py +++ b/sonic_package_manager/manifest.py @@ -88,7 +88,7 @@ def marshal(self, value): raise ManifestError(f'{value} has items not of type {self.type.__name__}') return value elif isinstance(value, self.type): - return [value] + return [] if not value else [value] else: raise ManifestError(f'{value} is not of type {self.type.__name__}')