COAP-22 remove 32 code errors in python code

As per landscape.io, code analyzing tool: https://landscape.io/github/openwsn-berkeley/coap