You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): report campus.audit credential-store failures instead of a traceback #57
The campus audit group (#55) reads and writes the audit API key in the
shared credential store, which is keyring-backed with a file fallback. A
store that cannot be read or written (locked keyring, unreadable credentials.json) raises CredentialError.
campus audit logout catches it and reports it cleanly, but the other two
paths do not:
campus audit login — credentials.set_audit_api_key(...) is
unguarded, so a store failure escapes as a full Python traceback.
get_audit_client() — credentials.get_audit_api_key() (and the URL
binding read) are unguarded, so every API-backed audit command raises a
traceback instead of an error message.
The rest of the CLI already treats a credential-store failure as a clean,
reported error; the audit group should match.
Proposed fix
Wrap the credential-store reads and writes in the audit group the same way campus audit logout already does: catch CredentialError, print an
actionable error with print_error, and exit 1.
Acceptance
campus audit login with a store that raises CredentialError exits
1 with a message naming the failure, and no traceback.
An API-backed audit command with a store that raises CredentialError exits 1 with a message naming the failure, and no
traceback.
The stored audit key's URL binding read is covered by the same guard.
Fixed by 12b62eb, merged to main via PR #55 (campus.audit command group, #54). Verified: full suite green (293 tests, Python 3.11–3.14 CI), ruff clean.
Activity
fix(cli): campus.audit review fixes — key status, store errors, logou…
ngjunsiang commentedon Oct 20, 2026
Fixed by 12b62eb, merged to main via PR #55 (campus.audit command group, #54). Verified: full suite green (293 tests, Python 3.11–3.14 CI), ruff clean.