Storyyeller/Krakatau — pull request #40 by cernekee (2014-09-07 22:06:57+00:00)
Title: Fix race condition calling os.makedirs

If multiple assemble.py instances are running concurrently (e.g. from `make -j4`), there is a potential race condition between the call to os.path.exists() and the call to os.makedirs(). Fix this by ignoring EEXIST errors from os.makedirs().

See also: http://stackoverflow.com/questions/16029871/how-to-run-os-mkdir-with-p-option-in-python

This was tested with Python 2.7.3.