nvbn / django-bower

Easy way to use bower with your django project
https://django-bower.readthedocs.io/
518 stars 75 forks source link

Avoid OSError crash when BOWER_COMPONENTS_ROOT's parent directory doesn't exist #49

Closed PiDelport closed 9 years ago

PiDelport commented 9 years ago

If BOWER_COMPONENTS_ROOT points to a path consisting of more than one non-existent subdirectory, BowerAdapter.create_components_root() will crash with a message like:

OSError: [Errno 2] No such file or directory: '/path/to/directory'

This fix replaces the os.mkdir() call with os.makedirs(), which will create all the missing intermediate directories as needed.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.09%) to 93.33% when pulling 536313a98de09f2cd65841b359c4c8878609831d on pjdelport:master into e2634a1d2e304fd10fe6128f47287c82a24e0051 on nvbn:master.

nvbn commented 9 years ago

Thanks!