10 lines
255 B
Python
10 lines
255 B
Python
from pyinfra.parser.blob_parser import BlobParser, ParsingError
|
|
|
|
|
|
class StringBlobParser(BlobParser):
|
|
def parse(self, data: bytes):
|
|
try:
|
|
return data.decode()
|
|
except Exception as err:
|
|
raise ParsingError from err
|