Merge ubiquity:lp1921567 into ubiquity:master

Proposed by Jean-Baptiste Lallement
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: 2948096518bf197dfe507e9be0256d7cf1ab0aad
Merged at revision: 2948096518bf197dfe507e9be0256d7cf1ab0aad
Proposed branch: ubiquity:lp1921567
Merge into: ubiquity:master
Diff against target: 26 lines (+8/-0)
2 files modified
debian/changelog (+6/-0)
ubiquity/misc.py (+2/-0)
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
Review via email: mp+400450@code.launchpad.net

Commit message

Do not try to escape non string dconf values and return immediately.

To post a comment you must log in.
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Tested on Ubuntu and Kubuntu Hirsute Beta.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Makes sense, +1. I wonder why this only now surfaced - is it because of the two added in the master key merge?

+ self.preseed('ubiquity/crypto_key', self.ui.get_crypto_keys())
+ self.preseed('ubiquity/recovery_key', self.ui.get_recovery_keys())

But I'd expect this to happen in the past already in this case. Oh well, still, let's get it fixed.

review: Approve
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

It happened because the interface got the recovery key is not implemented on Kubuntu and the method returns a 'None' value.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 561d50f..f1a703a 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+ubiquity (21.04.13) UNRELEASED; urgency=medium
7+
8+ * misc: Fixed crash when trying to escape a non string (LP: #1921567)
9+
10+ -- Jean-Baptiste Lallement <jean-baptiste.lallement@ubuntu.com> Wed, 31 Mar 2021 10:39:43 +0200
11+
12 ubiquity (21.04.12) hirsute; urgency=medium
13
14 [ Didier Roche ]
15diff --git a/ubiquity/misc.py b/ubiquity/misc.py
16index 72333e7..e7175cc 100644
17--- a/ubiquity/misc.py
18+++ b/ubiquity/misc.py
19@@ -640,6 +640,8 @@ def format_size(size):
20
21
22 def debconf_escape(text):
23+ if type(text) is not str:
24+ return text
25 escaped = text.replace('\\', '\\\\').replace('\n', '\\n')
26 return re.sub(r'(\s)', r'\\\1', escaped)
27

Subscribers

People subscribed via source and target branches