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
=== modified file 'bin/ubuntu-sso-login'
--- bin/ubuntu-sso-login 2010-10-08 22:05:12 +0000
+++ bin/ubuntu-sso-login 2010-10-12 12:17:46 +0000
@@ -64,16 +64,15 @@
6464
6565
66def sighup_handler(*a, **kw):66def sighup_handler(*a, **kw):
67 """Stop the service.67 """Stop the service."""
6868 # This handler may be called in any thread, so is not thread safe.
69 This is not thread safe, see the link below for info:69 # See the link below for info:
70 www.listware.net/201004/gtk-devel-list/115067-unix-signals-in-glib.html70 # www.listware.net/201004/gtk-devel-list/115067-unix-signals-in-glib.html
71 """71 #
72 from twisted.internet import reactor72 # gtk.main_quit and the logger methods are safe to be called from any thread.
73 # Module 'twisted.internet.reactor' has no 'stop' member73 # Just don't call other random stuff here.
74 # pylint: disable=E1101
75 logger.info("Stoping Ubuntu SSO login manager since SIGHUP was received.")74 logger.info("Stoping Ubuntu SSO login manager since SIGHUP was received.")
76 reactor.stop()75 gtk.main_quit()
7776
7877
79if __name__ == "__main__":78if __name__ == "__main__":
@@ -85,10 +84,6 @@
85 logger.error("Ubuntu SSO login manager already running, quitting.")84 logger.error("Ubuntu SSO login manager already running, quitting.")
86 sys.exit(0)85 sys.exit(0)
8786
88 logger.debug("Installing the Twisted gtk2reactor.")
89 from twisted.internet import gtk2reactor
90 gtk2reactor.install()
91
92 logger.debug("Hooking up SIGHUP with handler %r.", sighup_handler)87 logger.debug("Hooking up SIGHUP with handler %r.", sighup_handler)
93 signal.signal(signal.SIGHUP, sighup_handler)88 signal.signal(signal.SIGHUP, sighup_handler)
9489
@@ -99,7 +94,4 @@
99 bus=dbus.SessionBus()),94 bus=dbus.SessionBus()),
100 object_path=DBUS_CRED_PATH)95 object_path=DBUS_CRED_PATH)
10196
102 from twisted.internet import reactor97 gtk.main()
103 # Module 'twisted.internet.reactor' has no 'run' member
104 # pylint: disable=E1101
105 reactor.run()

Subscribers

People subscribed via source and target branches