Indeed the current hook already does not create a report for scripts in
your home directory:

        if not apport.fileutils.likely_packaged(binary):
            return

which returns true if the executable path starts with the usual system
directories (/usr/bin, /lib, etc.).

So, if I understood you correctly, 'import apport.report' is too heavy
here? The code can certainly be reshuffled to postpone that import until
after above check, which would reduce the amount of parsed code for an
exception in non-packaged Python programs.

** Changed in: apport (Ubuntu)
       Status: Unconfirmed => Confirmed

** Changed in: apport (Ubuntu)
       Status: Confirmed => In Progress

-- 
apport Python exception hook too aggressive
https://bugs.launchpad.net/bugs/109955
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

Reply via email to