Skip to content

fix: Harmonize timeout exceptions to OSError per convention #44. #319

@nedseb

Description

@nedseb

Context

The auto-trigger convention (#44) specifies that timeout errors in _ensure_data() and related polling methods should raise OSError. Most drivers follow this:

Driver Timeout exception Follows #44
HTS221 OSError
LIS2MDL OSError
VL53L1X OSError
APDS9960 OSError
ISM330DL OSError
BME280 OSError ✅ (fixed in PR #318)
WSEN-PADS WSENPADSTimeout
WSEN-HIDS WSENHIDSTimeoutError

Tasks

  • lib/wsen-pads/wsen_pads/device.py: change raise WSENPADSTimeout(...) to raise OSError(...) in _ensure_data() and _wait_boot()
  • lib/wsen-hids/wsen_hids/device.py: change raise WSENHIDSTimeoutError(...) to raise OSError(...) in one-shot timeout paths
  • Update or remove unused timeout exception classes from exceptions.py if no longer referenced
  • Verify tests still pass after changes

Reference

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions