tridge/pymavlink — Issue #9: thread safety of mkdir_p
Author: jgoppert
Created: 2012-03-01 04:37:55+00:00
State: open

during make -j4 builds, i was getting file exists errors, this fixes this problem by catching the exception, also makedirs now exists instead of using the recursive function call

def mkdir_p(dir):
try:
os.makedirs(dir)
except OSError as exc:
if exc.errno == errno.EEXIST:
pass
else: raise