MCPcopy
hub / github.com/saltstack/salt / dump

Function dump

tests/packdump.py:14–23  ·  view source on GitHub ↗

Read in a path and dump the contents to the screen

(path)

Source from the content-addressed store, hash-verified

12
13
14def dump(path):
15 """
16 Read in a path and dump the contents to the screen
17 """
18 if not os.path.isfile(path):
19 print("Not a file")
20 return
21 with open(path, "rb") as fp_:
22 data = salt.utils.msgpack.loads(fp_.read())
23 pprint.pprint(data)
24
25
26if __name__ == "__main__":

Callers 1

packdump.pyFile · 0.70

Calls 3

openFunction · 0.50
loadsMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected