Merge lp:~nataliabidart/ubuntu-sso-client/import-qt4reactor into lp:ubuntu-sso-client

Proposed by Natalia Bidart
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 812
Merged at revision: 810
Proposed branch: lp:~nataliabidart/ubuntu-sso-client/import-qt4reactor
Merge into: lp:ubuntu-sso-client
Diff against target: 62 lines (+3/-17)
3 files modified
bin/windows-ubuntu-sso-login (+2/-2)
ubuntu_sso/gtk/gui.py (+0/-2)
ubuntu_sso/utils/txsecrets.py (+1/-13)
To merge this branch: bzr merge lp:~nataliabidart/ubuntu-sso-client/import-qt4reactor
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Manuel de la Peña (community) Approve
Review via email: mp+81978@code.launchpad.net

Commit message

- Import qt4reactor properly (LP: #888722).
- Do not set glib dbus main loop as default in txsecrets library (LP: #889146).

To post a comment you must log in.
811. By Natalia Bidart

- Do not set glib dbus main loop as default in txsecrets library (LP: #889146).

812. By Natalia Bidart

Removed unused import.

Revision history for this message
Manuel de la Peña (mandel) wrote :

Code works and tests pass. I'll give a +1 now but with the condition that we talk with <email address hidden> to ask why he added a conditional import of gobject in the code of txsecrets.

Is there a particular reason besides allowing to use Gtk3? Should we do the same in ubuntu-sso-login?

review: Approve
Revision history for this message
Alejandro J. Cura (alecu) wrote :

+1
And to answer mandel's question: bug #829186.
Since this branch no longer needs gobject then those conditional imports are no longer needed.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/windows-ubuntu-sso-login'
2--- bin/windows-ubuntu-sso-login 2011-09-29 13:57:26 +0000
3+++ bin/windows-ubuntu-sso-login 2011-11-11 16:21:23 +0000
4@@ -25,8 +25,8 @@
5 from PyQt4 import QtGui
6 # need to create the QApplication before installing the reactor
7 app = QtGui.QApplication(sys.argv)
8-import qtreactor.qt4reactor
9-qtreactor.qt4reactor.install()
10+import qt4reactor
11+qt4reactor.install()
12
13 from twisted.internet import reactor, defer
14 from twisted.spread.pb import PBServerFactory
15
16=== modified file 'ubuntu_sso/gtk/gui.py'
17--- ubuntu_sso/gtk/gui.py 2011-09-15 23:18:59 +0000
18+++ ubuntu_sso/gtk/gui.py 2011-11-11 16:21:23 +0000
19@@ -30,7 +30,6 @@
20 import dbus
21 import gtk
22
23-from dbus.mainloop.glib import DBusGMainLoop
24 from twisted.internet.defer import inlineCallbacks
25
26 from ubuntu_sso import (
27@@ -79,7 +78,6 @@
28 # pylint: disable=E1101
29
30
31-DBusGMainLoop(set_as_default=True)
32 logger = setup_logging('ubuntu_sso.gui')
33
34 # To be removed when Python bindings provide these constants
35
36=== modified file 'ubuntu_sso/utils/txsecrets.py'
37--- ubuntu_sso/utils/txsecrets.py 2011-09-06 11:55:03 +0000
38+++ ubuntu_sso/utils/txsecrets.py 2011-11-11 16:21:23 +0000
39@@ -21,22 +21,10 @@
40 * http://code.confuego.org/secrets-xdg-specs/
41 """
42
43-import sys
44-# pylint: disable=E0611,F0401
45-if 'gobject' in sys.modules:
46- import gobject as GObject
47-else:
48- from gi.repository import GObject
49-# pylint: enable=E0611,F0401
50 import dbus
51-from dbus.mainloop.glib import DBusGMainLoop
52-import dbus.mainloop.glib
53+
54 from twisted.internet.defer import Deferred
55
56-GObject.threads_init()
57-dbus.mainloop.glib.threads_init()
58-DBusGMainLoop(set_as_default=True)
59-
60 BUS_NAME = "org.freedesktop.secrets"
61 SERVICE_IFACE = "org.freedesktop.Secret.Service"
62 PROMPT_IFACE = "org.freedesktop.Secret.Prompt"

Subscribers

People subscribed via source and target branches