This commit is contained in:
Mahmoud Hashemi 2014-03-01 16:35:09 -08:00
parent ffd6abd1d2
commit d0ffe8b407
1 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,7 @@
import os
import re
import errno
import fnmatch
@ -26,3 +27,13 @@ def iter_find_files(directory, patterns):
filename = os.path.join(root, basename)
yield filename
return
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):
return
raise
return