python: do not hung on malformed blobs