MCPcopy
hub / github.com/benoitc/gunicorn / data_source

Function data_source

tests/t.py:15–21  ·  view source on GitHub ↗
(fname)

Source from the content-addressed store, hash-verified

13
14
15def data_source(fname):
16 buf = io.BytesIO()
17 with open(fname) as handle:
18 for line in handle:
19 line = line.rstrip("\n").replace("\\r\\n", "\r\n")
20 buf.write(line.encode('latin1'))
21 return buf
22
23
24class request:

Callers 1

runMethod · 0.85

Calls 2

encodeMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected