MCPcopy Create free account
hub / github.com/billryan/algorithm-exercise / mkdir_p

Function mkdir_p

scripts/util.py:7–14  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

5import errno
6
7def mkdir_p(path):
8 try:
9 os.makedirs(path)
10 except OSError as exc: # Python >2.5
11 if exc.errno == errno.EEXIST and os.path.isdir(path):
12 pass
13 else:
14 raise
15
16
17def par_dir(path):

Callers 1

main.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected