Merge lp:~nataliabidart/ubuntu-sso-client/fix-100pct-links-stable into lp:ubuntu-sso-client/stable-1-0

Proposed by Natalia Bidart
Status: Merged
Approved by: Vincenzo Di Somma
Approved revision: 633
Merged at revision: 633
Proposed branch: lp:~nataliabidart/ubuntu-sso-client/fix-100pct-links-stable
Merge into: lp:ubuntu-sso-client/stable-1-0
Diff against target: 48 lines (+9/-17)
1 file modified
bin/ubuntu-sso-login (+9/-17)
To merge this branch: bzr merge lp:~nataliabidart/ubuntu-sso-client/fix-100pct-links-stable
Reviewer Review Type Date Requested Status
Vincenzo Di Somma (community) Approve
John Lenton (community) Approve
Review via email: mp+38210@code.launchpad.net

Commit message

Replace twisted gtk reactor with the standard gtk mainloop. (LP: #655327).

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

I don't know if this deserves a badge for finding the issue, or a scoop of icecream to the forehead for putting in there in the first place...

good job we fixed it, either way :)

review: Approve
Revision history for this message
Vincenzo Di Somma (vds) wrote :

Tests pass, code looks ok!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntu-sso-login'
2--- bin/ubuntu-sso-login 2010-10-08 22:05:12 +0000
3+++ bin/ubuntu-sso-login 2010-10-12 12:17:46 +0000
4@@ -64,16 +64,15 @@
5
6
7 def sighup_handler(*a, **kw):
8- """Stop the service.
9-
10- This is not thread safe, see the link below for info:
11- www.listware.net/201004/gtk-devel-list/115067-unix-signals-in-glib.html
12- """
13- from twisted.internet import reactor
14- # Module 'twisted.internet.reactor' has no 'stop' member
15- # pylint: disable=E1101
16+ """Stop the service."""
17+ # This handler may be called in any thread, so is not thread safe.
18+ # See the link below for info:
19+ # www.listware.net/201004/gtk-devel-list/115067-unix-signals-in-glib.html
20+ #
21+ # gtk.main_quit and the logger methods are safe to be called from any thread.
22+ # Just don't call other random stuff here.
23 logger.info("Stoping Ubuntu SSO login manager since SIGHUP was received.")
24- reactor.stop()
25+ gtk.main_quit()
26
27
28 if __name__ == "__main__":
29@@ -85,10 +84,6 @@
30 logger.error("Ubuntu SSO login manager already running, quitting.")
31 sys.exit(0)
32
33- logger.debug("Installing the Twisted gtk2reactor.")
34- from twisted.internet import gtk2reactor
35- gtk2reactor.install()
36-
37 logger.debug("Hooking up SIGHUP with handler %r.", sighup_handler)
38 signal.signal(signal.SIGHUP, sighup_handler)
39
40@@ -99,7 +94,4 @@
41 bus=dbus.SessionBus()),
42 object_path=DBUS_CRED_PATH)
43
44- from twisted.internet import reactor
45- # Module 'twisted.internet.reactor' has no 'run' member
46- # pylint: disable=E1101
47- reactor.run()
48+ gtk.main()

Subscribers

People subscribed via source and target branches