Skip to content

Commit

Permalink
Python: Delete key wasn't actually persisting (#20486)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrjerryjohns authored and pull[bot] committed Feb 6, 2024
1 parent aca6ef0 commit 1258840
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controller/python/chip/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1258840

Please sign in to comment.