Patch for better error message on protocol error.
Recently I got lot of these errors in my logs and had no clue what it meant until I printed byte and response and it showed out of memory.
Fixed indentation to 4 spaces
Making fix PEP8 compliant
stylistic
Merge branch 'pr/394'