apt_check.py crashes with exception "AttributeError"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-notifier (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
On my Ubuntu server, I received the message for quite some time (> 1 year):
"The list of available updates is more than a week old"
I regularly run "apt update", so the message simply isn't true.
After some research, I manage to identify the script "/usr/lib/
When executed with parameter "--human-readable", the following exception is thrown.
Without "--human-readable", no exception is thrown.
Traceback (most recent call last):
File "/usr/lib/
pdb.
File "/usr/lib/
self.
File "/usr/lib/
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/usr/lib/
import apt
File "/usr/lib/
write_
File "/usr/lib/
esm_distro = is_esm_distro()
File "/usr/lib/
DISTRO in ubuntu_
AttributeError: 'UbuntuDistroInfo' object has no attribute 'supported_esm'
Uncaught exception. Entering post mortem debugging
Ubuntu version:
# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https:/
SUPPORT_URL="https:/
BUG_REPORT_URL="https:/
PRIVACY_
VERSION_
UBUNTU_
Changed in update-notifier (Ubuntu): | |
status: | Incomplete → Invalid |
As a simple solution, I added a "try ... except" block around line 150. This solved the issue.