Merge ~nteodosio/update-manager:main-no-attribute into update-manager:main

Proposed by Nathan Teodosio
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 8004b9161b9cc0c4d43e59e8c14404e0696c8e0f
Merged at revision: 8004b9161b9cc0c4d43e59e8c14404e0696c8e0f
Proposed branch: ~nteodosio/update-manager:main-no-attribute
Merge into: update-manager:main
Diff against target: 28 lines (+9/-0)
2 files modified
UpdateManager/UpdatesAvailable.py (+3/-0)
debian/changelog (+6/-0)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+466327@code.launchpad.net

Description of the change

Previous fix for LP:2064211 was insufficient, as can be seen by running the test case of the bug, namely UA_CONFIG_FILE=/ update-manager --no-update.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/UpdateManager/UpdatesAvailable.py b/UpdateManager/UpdatesAvailable.py
2index 75cfd33..ffdb91c 100644
3--- a/UpdateManager/UpdatesAvailable.py
4+++ b/UpdateManager/UpdatesAvailable.py
5@@ -397,6 +397,9 @@ class UpdatesAvailable(InternalDialog):
6 apt_news = self._get_apt_news(
7 "/var/lib/ubuntu-advantage/messages/apt-news"
8 )
9+ except Exception as e:
10+ print("Error running current_news end-point: ", e)
11+ apt_news = ""
12 if apt_news:
13 self.news.get_buffer().set_text(apt_news)
14 self.expander_news.set_visible(True)
15diff --git a/debian/changelog b/debian/changelog
16index bb7c206..4cf489d 100644
17--- a/debian/changelog
18+++ b/debian/changelog
19@@ -1,3 +1,9 @@
20+update-manager (1:24.10.2) oracular; urgency=medium
21+
22+ * Don't crash if the current_news() end-point of the Pro API fails (LP: #2064211).
23+
24+ -- Nathan Pratta Teodosio <nathan.teodosio@canonical.com> Thu, 23 May 2024 16:54:47 +0200
25+
26 update-manager (1:24.10.1) oracular; urgency=medium
27
28 [ Nathan Pratta Teodosio ]

Subscribers

People subscribed via source and target branches