From 11e6bcb21d02ab5137502cd280135e16e73b8f6b Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Fri, 23 Jun 2023 01:05:17 -0400 Subject: [PATCH] dupe() memory in set_memory() for memcache The memory passed to set_memory() is frozen, so if it's saved in memcache, the next time you try to change the memory, you'll get a lot of "fix this driver!" warnings from memedit and friends. --- chirp/drivers/kenwood_live.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chirp/drivers/kenwood_live.py b/chirp/drivers/kenwood_live.py index bfac37932..5d8c0736b 100644 --- a/chirp/drivers/kenwood_live.py +++ b/chirp/drivers/kenwood_live.py @@ -289,7 +289,7 @@ def set_memory(self, memory): memory.name)) if not iserr(r2): memory.name = memory.name.rstrip() - self._memcache[memory.number] = memory + self._memcache[memory.number] = memory.dupe() else: raise errors.InvalidDataError("Radio refused name %i: %s" % (memory.number,