From ae82b2ee675f16bd378bb0d34ec9a9e926a48119 Mon Sep 17 00:00:00 2001 From: Swann Martinez Date: Tue, 19 Mar 2019 17:49:17 +0100 Subject: [PATCH] feat(rcf):append key removal --- net_components.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net_components.py b/net_components.py index e5cbecc..e20f61b 100644 --- a/net_components.py +++ b/net_components.py @@ -107,8 +107,10 @@ class RCFMessage(object): def store(self, dikt): """Store me in a dict if I have anything to store""" # this currently erasing old value - if self.key is not None: + if self.key is not None and self.body is not None: dikt[self.key] = self + elif self.key in dikt: + del dikt[self.key] def send(self, socket):