Skip to content

Commit

Permalink
Re-removed OSError
Browse files Browse the repository at this point in the history
  • Loading branch information
bf777 committed Oct 22, 2024
1 parent 66883a4 commit 4b7b27a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mesonet/atlas_brain_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def atlasBrainMatch(
mask_warped_to_use, pts=[bulb], color=[255, 255, 255]
)
io.imsave(mask_path, mask_warped_to_use)
except OSError:
except:
print("No olfactory bulb found!")
mask_warped_to_use = cv2.cvtColor(
mask_warped_to_use, cv2.COLOR_BGR2GRAY
Expand Down
10 changes: 5 additions & 5 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
if not os.path.isdir(output_file_atlas_brain):
try:
os.makedirs(output_file_atlas_brain)
except OSError:
except:
print("Creation of the directory %s failed" % output_file_atlas_brain)
else:
print("Successfully created the directory %s " % output_file_atlas_brain)
Expand All @@ -38,7 +38,7 @@
if not os.path.isdir(output_file_brain_atlas):
try:
os.makedirs(output_file_brain_atlas)
except OSError:
except:
print("Creation of the directory %s failed" % output_file_brain_atlas)
else:
print("Successfully created the directory %s " % output_file_brain_atlas)
Expand All @@ -48,7 +48,7 @@
if not os.path.isdir(output_file_sensory):
try:
os.makedirs(output_file_sensory)
except OSError:
except:
print("Creation of the directory %s failed" % output_file_sensory)
else:
print("Successfully created the directory %s " % output_file_sensory)
Expand All @@ -58,7 +58,7 @@
if not os.path.isdir(output_file_MBFM_U_Net):
try:
os.makedirs(output_file_MBFM_U_Net)
except OSError:
except:
print("Creation of the directory %s failed" % output_file_MBFM_U_Net)
else:
print("Successfully created the directory %s " % output_file_MBFM_U_Net)
Expand All @@ -68,7 +68,7 @@
if not os.path.isdir(output_file_voxelmorph):
try:
os.makedirs(output_file_voxelmorph)
except OSError:
except:
print("Creation of the directory %s failed" % output_file_voxelmorph)
else:
print("Successfully created the directory %s " % output_file_voxelmorph)
Expand Down

0 comments on commit 4b7b27a

Please sign in to comment.