Whole file
kellyjonbrazil/jc
The author described this change as “fix uptime for "user" instead of "users"”. It counts as a record because the check below fails on the code as it stood at 71af0c555 and passes on 40eb2b7ef, with nothing else changed between the two runs.
Projectkellyjonbrazil/jc
Fix saved2024-09-07
Sharing licenceMIT · LICENSE.md
Change size+2 −2
What the code was meant to do, written into the code itself as a save note
fix uptime for "user" instead of "users"
The change
| 65 | 65 | ||
| 66 | 66 | class info(): | |
| 67 | 67 | """Provides parser metadata (version, author, etc.)""" | |
| 68 | - | version = '1.9' | |
| 68 | + | version = '1.10' | |
| 69 | 69 | description = '`uptime` command parser' | |
| 70 | 70 | author = 'Kelly Brazil' | |
| 71 | 71 | author_email = 'kellyjonbrazil@gmail.com' | |
| ⋯ | |||
| 162 | 162 | raw_output = {} | |
| 163 | 163 | ||
| 164 | 164 | if jc.utils.has_data(data): | |
| 165 | - | if 'users' in data: | |
| 165 | + | if 'user' in data: | |
| 166 | 166 | # standard uptime output | |
| 167 | 167 | time, _, *uptime, users, _, _, _, load_1m, load_5m, load_15m = data.split() | |
| 168 | 168 | ||
The check that tells the two apart
fail→pass·tests/test_uptime.py::MyTests::test_uptime_user
Check file tests/test_uptime.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 it71af0c55553e17c598c9f43b8271bfb069795af5
Broken version dated2024-09-06
Modulejc.parsers.uptime
Units changedinfo, parse
Fingerprintb7f55d49838d18c7
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-31parse
- 2025-03-31fix time parser for missing centiseconds
- 2024-10-18Fix broken controller regexp scheme in the bluetoothctl parser (#599)