Repository navigation
Commit 9eba0be
Show specific reason when hardware volume is unavailable (#152)
## Summary
- Split the generic `except (ImportError, OSError)` in
`hardware_volume.py` into separate handlers, each capturing a
descriptive `UNAVAILABLE_REASON`
- The CLI error message now tells the user exactly what's wrong: missing
Python package (`pulsectl-asyncio`) vs missing system library
(`libpulse0`) vs non-Linux platform
- Previously, the error always said "Install pulsectl-asyncio" even when
the package was installed but the system library was missing
Closes #151
## Test plan
- [ ] On Linux without `libpulse0`: verify error mentions `sudo apt-get
install libpulse0`
- [ ] On Linux without `pulsectl-asyncio`: verify error mentions `pip
install pulsectl-asyncio`
- [ ] On non-Linux: verify error mentions "only supported on Linux"
- [ ] On Linux with everything installed: verify hardware volume works
normally
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent ae631df commit 9eba0be
2 files changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
591 | 592 | | |
592 | 593 | | |
593 | 594 | | |
594 | | - | |
595 | | - | |
| 595 | + | |
| 596 | + | |
596 | 597 | | |
597 | 598 | | |
598 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | | - | |
19 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
20 | 31 | | |
21 | 32 | | |
22 | 33 | | |
| |||
0 commit comments