(cls, blob)
| 190 | |
| 191 | @classmethod |
| 192 | def from_blob(cls, blob): |
| 193 | obj = cls() |
| 194 | if (not isinstance(blob, bytes)) and (not isinstance(blob, bytearray)): |
| 195 | po = obj.parse(bytearray(blob, 'latin-1')) |
| 196 | |
| 197 | else: |
| 198 | po = obj.parse(bytearray(blob)) |
| 199 | |
| 200 | if po is not None: |
| 201 | return (obj, po) |
| 202 | |
| 203 | return obj # pragma: no cover |
| 204 | |
| 205 | def __init__(self): |
| 206 | super(Armorable, self).__init__() |