MCPcopy Create free account
hub / github.com/ActiveState/code / check_bakfiles

Function check_bakfiles

recipes/Python/576537_Deep_rename/recipe-576537.py:149–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147 g.write(line)
148
149def check_bakfiles():
150 bakpaths = [pth for pth in all_filepaths() if pth.endswith('.bak')]
151 if len(bakpaths) > 0:
152 raise Exception("Fatal: backup files ('.bak') detected: %s" % ', '.join(bakpaths))
153
154def check_swapfiles():
155 swappaths = [pth for pth in all_filepaths() if pth.endswith('.swp')]

Callers 1

exec_cmdFunction · 0.85

Calls 3

all_filepathsFunction · 0.85
endswithMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected