cdusold / DriveLink

A set of memory conserving python data structures.
MIT License
0 stars 0 forks source link

Create folders if they don't exist. #3

Closed cdusold closed 7 years ago

cdusold commented 7 years ago

This is as simple as

try:
    os.makedirs(loc)
except OSError as exception:
    if exception.errno != errno.EEXIST:
        raise
cdusold commented 7 years ago

My bad. This already was happening (I thought it was). I just had a file named the same thing I wanted my folder to be. Perhaps a catch for that would be appropriate.