Merge ~nteodosio/software-properties:update-state-after-token-none into software-properties:ubuntu/master
Proposed by
Nathan Teodosio
Status: | Rejected |
---|---|
Rejected by: | Sebastien Bacher |
Proposed branch: | ~nteodosio/software-properties:update-state-after-token-none |
Merge into: | software-properties:ubuntu/master |
Diff against target: |
17 lines (+4/-0) 1 file modified
softwareproperties/gtk/DialogUaAttach.py (+4/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastien Bacher | Disapprove | ||
Review via email: mp+437143@code.launchpad.net |
Description of the change
Immediately call update_state after setting contract_token = None.
To post a comment you must log in.
attach function chooses token according to
if self.token_ radio.get_ active( ): field.get_ text()
token = self.token_
else:
token = self.contract_token
The first case will always return a string, which will therefore not raise "TypeError: Expected a string or unicode object."
So the problem must be self.contract_token being None but "confirm" button being active, as per the traceback[1].
Ubuntu Advantage Client's wait() is guaranteed to return a non None, string value[2].
So the issue must be in the delayed call to update_state after setting contract_token to None in start_magic_attach.
[1] https:/ /errors. ubuntu. com/problem/ ad46a4f47c7f151 d8719cb12227f57 011b622f37 /github. com/canonical/ ubuntu- advantage- client/ blob/df9c1309bd 7542007e182fa85 bdd0c14b7babe98 /uaclient/ api/u/pro/ attach/ magic/wait/ v1.py#L95
[2] https:/