diff --git a/feature_creation_scripts/iceshelves/write_basin_distances.py b/feature_creation_scripts/iceshelves/write_basin_distances.py index e8feae6f..3a7147f4 100755 --- a/feature_creation_scripts/iceshelves/write_basin_distances.py +++ b/feature_creation_scripts/iceshelves/write_basin_distances.py @@ -62,7 +62,10 @@ def readBasinImage(name): outFile.createDimension('basinCount',basinCount) var = outFile.createVariable('distances','f8',('basinCount','y','x')) -os.makedirs('dist') +try: + os.makedirs('dist') +except OSError: + pass for basinIndex in range(len(names)): name = names[basinIndex] diff --git a/feature_creation_scripts/iceshelves/write_basin_images.py b/feature_creation_scripts/iceshelves/write_basin_images.py index 1af6f91a..bffc034c 100755 --- a/feature_creation_scripts/iceshelves/write_basin_images.py +++ b/feature_creation_scripts/iceshelves/write_basin_images.py @@ -85,7 +85,10 @@ def writeBasinImage(basinShape, name): dx = 1e3 -os.makedirs('basins') +try: + os.makedirs('basins') +except OSError: + pass for index in range(len(basinShapes)): name = basinData['features'][index]['properties']['name']