Skip to content

Commit

Permalink
catch Exception class getting libsgio.rotation_rate() (#11125)
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo authored Apr 18, 2023
1 parent a776a2b commit f0e51da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewared/middlewared/plugins/device_/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _get_rotation_rate(self, device_path):
try:
disk = libsgio.SCSIDevice(device_path)
rotation_rate = disk.rotation_rate()
except (OSError, RuntimeError):
except Exception:
if device_path not in self.DISK_ROTATION_ERROR_LOG_CACHE:
self.DISK_ROTATION_ERROR_LOG_CACHE.add(device_path)
self.logger.error('Ioctl failed while retrieving rotational rate for disk %s', device_path)
Expand Down

0 comments on commit f0e51da

Please sign in to comment.