From 275102006b8151533c816c147c9df144bad62ea6 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Fri, 8 Jul 2022 09:13:50 -0700 Subject: [PATCH] Python: Delete key wasn't actually persisting (#20486) The Python implementation of the PersistentStorageDelegate::SyncDeleteKey API was not actually syncing the deleted key back to the underlying JSON file, resulting in the deletion not actually 'sticking' despite passing the storage audit. --- src/controller/python/chip/storage/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controller/python/chip/storage/__init__.py b/src/controller/python/chip/storage/__init__.py index cb5c8a1deb9c29..20d04eca00ca83 100644 --- a/src/controller/python/chip/storage/__init__.py +++ b/src/controller/python/chip/storage/__init__.py @@ -165,6 +165,7 @@ def GetSdkKey(self, key: str): def DeleteSdkKey(self, key: str): del(self.jsonData['sdk-config'][key]) + self.Sync() def GetUnderlyingStorageAdapter(self): return self._storageAdapterObj