One function
parse in kellyjonbrazil/jc
The author described this change as “fix for missing dB value”. It counts as a record because the check below fails on the code as it stood at ed3046bb1 and passes on 1182c9f26, with nothing else changed between the two runs.
Projectkellyjonbrazil/jc
Fix saved2025-03-31
Sharing licenceMIT · LICENSE.md
Change size+8 −2
What the code was meant to do, written into the code itself as a docstring
Main text parsing function Parameters: data: (string) text data to parse raw: (boolean) unprocessed output if True quiet: (boolean) suppress warning messages if True Returns: Dictionary. Raw or processed structured data.
The change
| 104 | 104 | channel_data = channel_info.split(" ") | |
| 105 | 105 | if channel_data[0] == "": | |
| 106 | 106 | continue | |
| 107 | + | ||
| 108 | + | if "dB" in channel_data[3]: | |
| 109 | + | db_value = channel_data[3].strip("[]") | |
| 110 | + | status = channel_data[4].strip("[]") | |
| 111 | + | else: | |
| 112 | + | db_value = "0.0db" | |
| 113 | + | status = channel_data[3].strip("[]") | |
| 114 | + | ||
| 107 | 115 | playback_value = channel_data[1] | |
| 108 | 116 | percentage = channel_data[2].strip("[]") # Extract percentage e.g., "100%" | |
| 109 | - | db_value = channel_data[3].strip("[]") # Extract db value e.g., "0.00db" | |
| 110 | - | status = channel_data[4].strip("[]") # Extract status e.g., "on" or "off" | |
| 111 | 117 | ||
| 112 | 118 | # Store channel mapping in the dictionary | |
| 113 | 119 | mapping[channel_name] = { |
The check that tells the two apart
fail→pass·tests/test_amixer.py::AmixerTests::test_amixer_missing_db
Check file tests/test_amixer.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before ited3046bb1b362bc2dc2503e23444e3ffebd2c1b5
Broken version dated2025-03-31
Modulejc.parsers.amixer
Units changedparse
Fingerprint72dff605a85bcac5
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in kellyjonbrazil/jc
- 2026-03-25parse
- 2026-03-25_process
- 2025-04-02Fix broken controller parser schema to include power state prop (#652)
- 2025-03-31fix time parser for missing centiseconds
- 2024-10-18Fix broken controller regexp scheme in the bluetoothctl parser (#599)
- 2024-09-07fix uptime for "user" instead of "users"