PythonDetails contains an error message if python not installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Low
|
Brian Murray |
Bug Description
[Test Case]
0) ensure python is not installed on the system
1) launch update-manager
2) kill update-manager
3) view the crash report
With the version of apport in the archive you will see messy PythonDetails like below. With the version of apport from -proposed you will instead see:
PythonDetails: N/A
[Regression Potential]
The fix for this also modified the code which creates Python3Details so we should ensure that Python3Details is not broken.
Original Description
-------
In an Ubuntu 18.04 apport-package report, bug 1768866, we can see the following which looks super messy:
PythonDetails: /root/Error: command ['which', 'python'] failed with exit code 1:, Error: [Errno 2] Aucun fichier ou dossier de ce type: "/root/Error: command ['which', 'python'] failed with exit code 1:": "/root/Error: command ['which', 'python'] failed with exit code 1:", unpackaged
Related branches
description: | updated |
tags: | added: id-5ae35ea55ac10e9203cade8d |
Changed in apport (Ubuntu Bionic): | |
status: | New → In Progress |
importance: | Undecided → Low |
assignee: | nobody → Brian Murray (brian-murray) |
description: | updated |
description: | updated |
This'll make it look nicer.
@@ -519,6 +519,9 @@ details( key, python, report): hookutils. command_ output( ['which' , python]) path.startswith ('Error: '): hookutils. command_ output( ['readlink' , '-f',
python_ path]) fileutils. find_file_ package( python_ path)
def add_python_
'''Add comma separated details about which python is being used'''
python_path = apport.
+ if python_
+ report[key] = 'N/A'
+ return
python_link = apport.
python_pkg = apport.