Skip to content

Commit

Permalink
Tweak pylint change; IOError -> OSError
Browse files Browse the repository at this point in the history
  • Loading branch information
dave3d committed Aug 27, 2024
1 parent 36471b7 commit 3bc4d25
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dicom2stl/utils/dicomutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ def scanDirForDicom(dicomdir):
matches = []
found_dirs = []
try:
for walk_output in os.walk(dicomdir):
root = walk_output[0]
filenames = walk_output[2]
for root, _, filenames in os.walk(dicomdir):
for filename in fnmatch.filter(filenames, "*.dcm"):
matches.append(os.path.join(root, filename))
if root not in found_dirs:
found_dirs.append(root)
except IOError as e:
except OSError as e:
print("Error in scanDirForDicom: ", e)
print("dicomdir = ", dicomdir)

Expand Down

0 comments on commit 3bc4d25

Please sign in to comment.