MCPcopy Index your code
hub / github.com/codemeta/codemeta / rm_file

Function rm_file

scripts/split.py:22–27  ·  view source on GitHub ↗

Removes a file if it exists, does nothing otherwise.

(filename)

Source from the content-addressed store, hash-verified

20
21
22def rm_file(filename):
23 """Removes a file if it exists, does nothing otherwise."""
24 try:
25 os.unlink(filename)
26 except FileNotFoundError:
27 pass
28
29with open(CROSSWALK_PATH) as fd:
30 reader = csv.reader(fd)

Callers 1

split.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected