Merge pull request #118 from jasonanovak/protobufs

Add error checking to ViewProtobuf
This commit is contained in:
Aldo Cortesi 2013-05-04 17:37:32 -07:00
commit 69a40c8179

View File

@ -389,8 +389,11 @@ class ViewProtobuf:
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, _ = p.communicate(input=content)
out, err = p.communicate(input=content)
if out:
return out
else:
return err
def __call__(self, hdrs, content, limit):
decoded = self.decode_protobuf(content)