Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Catch ValueError: not enough values to unpack
The problem report might be malformed which lets `whoopsie-upload-all` crash: ``` Traceback (most recent call last): File "data/whoopsie-upload-all", line 250, in <module> main() File "data/whoopsie-upload-all", line 232, in main stamps = collect_info() File "data/whoopsie-upload-all", line 163, in collect_info res = process_report(r) File "data/whoopsie-upload-all", line 77, in process_report r.load(f, binary="compressed") File "problem_report.py", line 173, in load (key, value) = line.split(b":", 1) ValueError: not enough values to unpack (expected 2, got 1) ``` Catch the `ValueError` and raise a `MalformedProblemReport` exception instead (which is catched by `whoopsie-upload-all` and `apport-unpack`). Bug: https://launchpad.net/bugs/1995100 Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
- Loading branch information