feat(rcf):append key removal

This commit is contained in:
Swann Martinez
2019-03-19 17:49:17 +01:00
parent cb7c5aa12e
commit ae82b2ee67

View File

@ -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):