Andrea (both :) ), this patch is too harsh. Ignoring all exceptions is a
bad thing.
Instead, you should replace (os.getenv("HOME") with (os.getenv("HOME",
"/root"). I could do this myself, but I leave this to you for the
purpose of mentoring. :)
The changelog entry isn't ideal either: "fix exception management to
avoid crash when unknown command is given". The exception management
works correctly, it catches a real error. It should read "Fix crash when
$HOME is not set, such as in recovery mode". If you apply my suggestion,
you should be more detailled: "If $HOME is unset (such as in recovery
mode), default to /root instead of crashing." or similar.
--
command-not-found crashes in recovery mode
https://bugs.launchpad.net/bugs/177934
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs