Skip to content

Commit

Permalink
Presence of optical drive caused crash
Browse files Browse the repository at this point in the history
  • Loading branch information
louwrentius committed Nov 30, 2023
1 parent c5f17e0 commit e0ea9f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="showtools",
version="2.0.2",
version="2.0.3",
author="louwrentius",
description="Show storage and network devices in table format on cli",
long_description=long_description,
Expand Down
3 changes: 2 additions & 1 deletion showtools/showlib/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def get_block_devices():
diskdevices = os.listdir(devicepath)
diskdevices.sort()
validdevices = []
invaliddevices = ("md","ram","loop","sr")
for device in diskdevices:
if not device.startswith("md") and not device.startswith("ram") and not device.startswith("loop"):
if not device.startswith(invaliddevices):
validdevices.append(device)
return validdevices

Expand Down

0 comments on commit e0ea9f6

Please sign in to comment.