Merge ~nteodosio/software-properties:initialize-pin into software-properties:ubuntu/master

Proposed by Nathan Teodosio
Status: Merged
Approved by: Sebastien Bacher
Approved revision: ccdd0c792ebb10b81efc1ec274211d1a22771c3e
Merged at revision: ccdd0c792ebb10b81efc1ec274211d1a22771c3e
Proposed branch: ~nteodosio/software-properties:initialize-pin
Merge into: software-properties:ubuntu/master
Diff against target: 11 lines (+1/-0)
1 file modified
softwareproperties/gtk/DialogUaAttach.py (+1/-0)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+436589@code.launchpad.net

Description of the change

    Initialize pin as empty string

    start_magic_attach is the only function that assigns a value to pin.
    If it can't retrieve it from the server, then it is uninitialized and
    selecting the pin radio button causes an error as update_state tries
    to use it (LP: #2004245).

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

Thanks, that should at least fix the exception until we work on a proper solution to display an explanation to the user in those cases

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/softwareproperties/gtk/DialogUaAttach.py b/softwareproperties/gtk/DialogUaAttach.py
2index 7a6af10..4959b14 100644
3--- a/softwareproperties/gtk/DialogUaAttach.py
4+++ b/softwareproperties/gtk/DialogUaAttach.py
5@@ -38,6 +38,7 @@ class DialogUaAttach:
6 self.contract_token = None
7 self.attaching = False
8 self.poll = None
9+ self.pin = ""
10
11 self.start_magic_attach()
12

Subscribers

People subscribed via source and target branches