Merge ~nteodosio/software-properties:network into software-properties:ubuntu/master

Proposed by Nathan Teodosio
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 970dbfee639624721ce93772239a52fe0da8b36f
Merged at revision: 970dbfee639624721ce93772239a52fe0da8b36f
Proposed branch: ~nteodosio/software-properties:network
Merge into: software-properties:ubuntu/master
Diff against target: 29 lines (+6/-5)
1 file modified
softwareproperties/gtk/DialogUaAttach.py (+6/-5)
Reviewer Review Type Date Requested Status
Sebastien Bacher Pending
Review via email: mp+436769@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks!

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 42d5365..5de167c 100644
3--- a/softwareproperties/gtk/DialogUaAttach.py
4+++ b/softwareproperties/gtk/DialogUaAttach.py
5@@ -46,8 +46,6 @@ class DialogUaAttach:
6 self.net_monitor, self.net_monitor.get_network_available(), 1
7 )
8
9- self.start_magic_attach()
10-
11 def run(self):
12 self.dialog.run()
13 self.dialog.hide()
14@@ -191,9 +189,12 @@ class DialogUaAttach:
15 self.no_connection.set_visible(not available)
16 self.radio_net_control_box.set_sensitive(available)
17 self.confirm_net_control_box.set_sensitive(available)
18- # wait() may have timed out without internet; Restart polling.
19- if (available and self.poll == None and not first_run):
20- self.poll = GLib.Thread.new("poll", self.poll_for_magic_token)
21+ if available:
22+ if self.pin == "":
23+ self.start_magic_attach()
24+ elif self.poll == None:
25+ # wait() timed out without internet; Restart polling.
26+ self.poll = GLib.Thread.new("poll", self.poll_for_magic_token)
27
28 def finish(self):
29 self.dialog.response(Gtk.ResponseType.OK)

Subscribers

People subscribed via source and target branches