From dfb7ed1c0066d1895e5f236854b5bcb7307c8f12 Mon Sep 17 00:00:00 2001 From: peter005_wong Date: Tue, 16 Jul 2024 11:41:46 +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 bc156f102c..8afbf02b5a 100644 --- a/sonic_package_manager/manifest.py +++ b/sonic_package_manager/manifest.py @@ -93,7 +93,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__}')