MCPcopy
hub / github.com/docker/docker-py / untar_file

Function untar_file

tests/helpers.py:42–47  ·  view source on GitHub ↗
(tardata, filename)

Source from the content-addressed store, hash-verified

40
41
42def untar_file(tardata, filename):
43 with tarfile.open(mode='r', fileobj=tardata) as t:
44 f = t.extractfile(filename)
45 result = f.read()
46 f.close()
47 return result
48
49
50def skip_if_desktop():

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected