Skip to content

Commit

Permalink
Python: Delete key wasn't actually persisting
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 committed Jul 8, 2022
1 parent 8ebd7f0 commit 01788cd
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 01788cd

Please sign in to comment.