apport_python_hook.py fails when running from nonexisting directory on linux

Bug #1852573 reported by David Pravec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
New
Undecided
Unassigned

Bug Description

when current directory no longer exists (deleted by other process), apport crashes.
this was tested on Linux:

[Wed Oct 30 14:43:50.665 2019] Error in sys.excepthook:
[Wed Oct 30 14:43:50.665 2019] Traceback (most recent call last):
[Wed Oct 30 14:43:50.665 2019] File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 67, in apport_excepthook
[Wed Oct 30 14:43:50.665 2019] binary = os.path.realpath(os.path.join(os.getcwd(), sys.argv[0]))
[Wed Oct 30 14:43:50.665 2019] FileNotFoundError: [Errno 2] No such file or directory

also, are you sure you want to search for sys.argv[0] in current directory?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.