python/cscp: fix empty dict as payload is not sent
Currently, Python checks if there is a payload with if payload
. However, this is not the correct behavior in all cases. For example, I might want to send an empty dictionary for initialization, but:
payload = {}
if not payload:
print("no payload!")
reveals says the wouldn't be a payload. So the correct statement is checking if the object is None.