Merge lp:~nataliabidart/ubuntu/maverick/ubuntu-sso-client/ubuntu-sso-client-1.0.2 into lp:ubuntu/maverick/ubuntu-sso-client

Proposed by Natalia Bidart
Status: Merged
Merged at revision: 15
Proposed branch: lp:~nataliabidart/ubuntu/maverick/ubuntu-sso-client/ubuntu-sso-client-1.0.2
Merge into: lp:ubuntu/maverick/ubuntu-sso-client
Diff against target: 199 lines (+31/-37)
7 files modified
PKG-INFO (+1/-1)
debian/changelog (+16/-0)
debian/preinst (+1/-1)
setup.py (+1/-1)
ubuntu_sso/gui.py (+5/-1)
ubuntu_sso/keyring.py (+3/-15)
ubuntu_sso/tests/test_keyring.py (+4/-18)
To merge this branch: bzr merge lp:~nataliabidart/ubuntu/maverick/ubuntu-sso-client/ubuntu-sso-client-1.0.2
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+36352@code.launchpad.net

Description of the change

Simple bug fixes, releasing v1.0.2.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'PKG-INFO'
--- PKG-INFO 2010-09-14 19:28:09 +0000
+++ PKG-INFO 2010-09-22 17:36:13 +0000
@@ -1,6 +1,6 @@
1Metadata-Version: 1.11Metadata-Version: 1.1
2Name: ubuntu-sso-client2Name: ubuntu-sso-client
3Version: 1.0.13Version: 1.0.2
4Summary: Ubuntu Single Sign-On client4Summary: Ubuntu Single Sign-On client
5Home-page: https://launchpad.net/ubuntu-sso-client5Home-page: https://launchpad.net/ubuntu-sso-client
6Author: Natalia Bidart6Author: Natalia Bidart
77
=== modified file 'debian/changelog'
--- debian/changelog 2010-09-14 19:28:09 +0000
+++ debian/changelog 2010-09-22 17:36:13 +0000
@@ -1,3 +1,19 @@
1ubuntu-sso-client (1.0.2-0ubuntu1) UNRELEASED; urgency=low
2
3 * New upstream release:
4
5 [ Natalia B. Bidart <natalia.bidart@canonical.com> ]
6 * Avoiding having the main window freezing when pinging the U1 server (LP:
7 #645162).
8
9 [ Alejandro J. Cura <alecu@canonical.com> ]
10 * Do not create the login keyring, use default instead. (LP: #639690)
11
12 [ Natalia B. Bidart <natalia.bidart@canonical.com> ]
13 * Avoid duplicating logging messages for module "main" (LP: #638981).
14
15 -- Natalia Bidart (nessita) <nataliabidart@gmail.com> Wed, 22 Sep 2010 13:47:22 -0300
16
1ubuntu-sso-client (1.0.1-0ubuntu1) maverick; urgency=low17ubuntu-sso-client (1.0.1-0ubuntu1) maverick; urgency=low
218
3 * New upstream release:19 * New upstream release:
420
=== modified file 'debian/preinst'
--- debian/preinst 2010-09-09 14:45:42 +0000
+++ debian/preinst 2010-09-22 17:36:13 +0000
@@ -3,7 +3,7 @@
33
4LASTVERSION="0.99.4-0ubuntu1"4LASTVERSION="0.99.4-0ubuntu1"
55
6pkill -HUP ubuntu-sso-login || true6pkill -HUP -f ubuntu-sso-login || true
77
8dpkg-maintscript-helper rm_conffile \8dpkg-maintscript-helper rm_conffile \
9/etc/xdg/ubuntu-sso/oauth_registration.d/ubuntuone "$LASTVERSION" -- "$@"9/etc/xdg/ubuntu-sso/oauth_registration.d/ubuntuone "$LASTVERSION" -- "$@"
1010
=== modified file 'setup.py'
--- setup.py 2010-09-14 19:28:09 +0000
+++ setup.py 2010-09-22 17:36:13 +0000
@@ -86,7 +86,7 @@
8686
87DistUtilsExtra.auto.setup(87DistUtilsExtra.auto.setup(
88 name='ubuntu-sso-client',88 name='ubuntu-sso-client',
89 version='1.0.1',89 version='1.0.2',
90 license='GPL v3',90 license='GPL v3',
91 author='Natalia Bidart',91 author='Natalia Bidart',
92 author_email='natalia.bidart@canonical.com',92 author_email='natalia.bidart@canonical.com',
9393
=== modified file 'ubuntu_sso/gui.py'
--- ubuntu_sso/gui.py 2010-09-08 19:25:02 +0000
+++ ubuntu_sso/gui.py 2010-09-22 17:36:13 +0000
@@ -730,10 +730,14 @@
730 signal, method, iface)730 signal, method, iface)
731 remove(method, signal_name=signal, dbus_interface=iface)731 remove(method, signal_name=signal, dbus_interface=iface)
732732
733 # destroy main window733 # hide the main window
734 if self.window is not None:734 if self.window is not None:
735 self.window.hide()735 self.window.hide()
736736
737 # process any pending events before emitting signals
738 while gtk.events_pending():
739 gtk.main_iteration()
740
737 if len(args) > 0 and args[0] in self.cancels:741 if len(args) > 0 and args[0] in self.cancels:
738 self.window.emit(SIG_USER_CANCELATION, self.app_name)742 self.window.emit(SIG_USER_CANCELATION, self.app_name)
739 elif len(self._gtk_signal_log) > 0:743 elif len(self._gtk_signal_log) > 0:
740744
=== modified file 'ubuntu_sso/keyring.py'
--- ubuntu_sso/keyring.py 2010-09-13 14:43:37 +0000
+++ ubuntu_sso/keyring.py 2010-09-22 17:36:13 +0000
@@ -28,7 +28,7 @@
28from ubuntu_sso.logger import setup_logging28from ubuntu_sso.logger import setup_logging
2929
3030
31logger = setup_logging("ubuntu_sso.main")31logger = setup_logging("ubuntu_sso.keyring")
32TOKEN_SEPARATOR = ' @ '32TOKEN_SEPARATOR = ' @ '
33SEPARATOR_REPLACEMENT = ' AT '33SEPARATOR_REPLACEMENT = ' AT '
3434
@@ -59,8 +59,6 @@
59class Keyring(object):59class Keyring(object):
60 """A Keyring for a given application name."""60 """A Keyring for a given application name."""
6161
62 KEYRING_NAME = "login"
63
64 def __init__(self, app_name):62 def __init__(self, app_name):
65 """Initialize this instance given the app_name."""63 """Initialize this instance given the app_name."""
66 if not gnomekeyring.is_available():64 if not gnomekeyring.is_available():
@@ -68,12 +66,6 @@
68 self.app_name = app_name66 self.app_name = app_name
69 self.token_name = get_token_name(self.app_name)67 self.token_name = get_token_name(self.app_name)
7068
71 def _create_keyring(self, name):
72 """Creates a keyring, or if it already exists, it does nothing."""
73 keyring_names = gnomekeyring.list_keyring_names_sync()
74 if not name in keyring_names:
75 gnomekeyring.create_sync(name, None)
76
77 def _find_keyring_item(self, attr=None):69 def _find_keyring_item(self, attr=None):
78 """Return the keyring item or None if not found."""70 """Return the keyring item or None if not found."""
79 if attr is None:71 if attr is None:
@@ -105,13 +97,9 @@
105 # Creates the secret from the credentials97 # Creates the secret from the credentials
106 secret = urllib.urlencode(cred)98 secret = urllib.urlencode(cred)
10799
108 # Create the keyring if it does not exists
109 self._create_keyring(self.KEYRING_NAME)
110
111 # Add our SSO credentials to the keyring100 # Add our SSO credentials to the keyring
112 gnomekeyring.item_create_sync(self.KEYRING_NAME,101 gnomekeyring.item_create_sync(None, gnomekeyring.ITEM_GENERIC_SECRET,
113 gnomekeyring.ITEM_GENERIC_SECRET, self.app_name,102 self.app_name, self._get_keyring_attr(), secret, True)
114 self._get_keyring_attr(), secret, True)
115103
116 def _migrate_old_token_name(self):104 def _migrate_old_token_name(self):
117 """Migrate credentials with old name, store them with new name."""105 """Migrate credentials with old name, store them with new name."""
118106
=== modified file 'ubuntu_sso/tests/test_keyring.py'
--- ubuntu_sso/tests/test_keyring.py 2010-09-13 14:43:37 +0000
+++ ubuntu_sso/tests/test_keyring.py 2010-09-22 17:36:13 +0000
@@ -60,7 +60,6 @@
6060
61 def __init__(self):61 def __init__(self):
62 """Initialize this instance."""62 """Initialize this instance."""
63 self.keyrings = set()
64 self.id_counter = itertools.count()63 self.id_counter = itertools.count()
65 self.store = {}64 self.store = {}
66 self.deleted = []65 self.deleted = []
@@ -89,14 +88,6 @@
89 raise gnomekeyring.NoMatchError()88 raise gnomekeyring.NoMatchError()
90 return items89 return items
9190
92 def list_keyring_names_sync(self):
93 """The keyring you are looking for may be here."""
94 return self.keyrings
95
96 def create_sync(self, name, password):
97 """Thanks, I'll create that keyring for you."""
98 self.keyrings.add((name, password))
99
100 def is_available(self):91 def is_available(self):
101 """A very available keyring."""92 """A very available keyring."""
102 return True93 return True
@@ -146,9 +137,6 @@
146 self.mgk = MockGnomeKeyring()137 self.mgk = MockGnomeKeyring()
147 self.patch(gnomekeyring, "item_create_sync", self.mgk.item_create_sync)138 self.patch(gnomekeyring, "item_create_sync", self.mgk.item_create_sync)
148 self.patch(gnomekeyring, "is_available", self.mgk.is_available)139 self.patch(gnomekeyring, "is_available", self.mgk.is_available)
149 self.patch(gnomekeyring, "create_sync", self.mgk.create_sync)
150 self.patch(gnomekeyring, "list_keyring_names_sync",
151 self.mgk.list_keyring_names_sync)
152 self.patch(gnomekeyring, "find_items_sync", self.mgk.find_items_sync)140 self.patch(gnomekeyring, "find_items_sync", self.mgk.find_items_sync)
153 self.patch(gnomekeyring, "item_delete_sync", self.mgk.item_delete_sync)141 self.patch(gnomekeyring, "item_delete_sync", self.mgk.item_delete_sync)
154 fake_gethostname = build_fake_gethostname("darkstar")142 fake_gethostname = build_fake_gethostname("darkstar")
@@ -163,8 +151,6 @@
163151
164 self.assertEqual(len(self.mgk.store), 2)152 self.assertEqual(len(self.mgk.store), 2)
165 self.assertEqual(len(self.mgk.deleted), 0)153 self.assertEqual(len(self.mgk.deleted), 0)
166 self.assertEqual(self.mgk.keyrings,
167 set([(keyring.Keyring.KEYRING_NAME, None)]))
168154
169 def test_delete_ubuntusso(self):155 def test_delete_ubuntusso(self):
170 """Test that a given key is deleted."""156 """Test that a given key is deleted."""
@@ -202,8 +188,8 @@
202 "oauth_token_secret": sample_oauth_secret,188 "oauth_token_secret": sample_oauth_secret,
203 }189 }
204 secret = urllib.urlencode(old_creds)190 secret = urllib.urlencode(old_creds)
205 self.mgk.item_create_sync(keyring.U1_APP_NAME, None,191 self.mgk.item_create_sync(None, None,
206 keyring.Keyring.KEYRING_NAME,192 keyring.U1_APP_NAME,
207 keyring.U1_KEY_ATTR,193 keyring.U1_KEY_ATTR,
208 secret, True)194 secret, True)
209195
@@ -223,8 +209,8 @@
223 "oauth_token_secret": sample_oauth_secret,209 "oauth_token_secret": sample_oauth_secret,
224 }210 }
225 secret = urllib.urlencode(old_creds)211 secret = urllib.urlencode(old_creds)
226 self.mgk.item_create_sync(keyring.U1_APP_NAME, None,212 self.mgk.item_create_sync(None, None,
227 keyring.Keyring.KEYRING_NAME,213 keyring.U1_APP_NAME,
228 keyring.U1_KEY_ATTR,214 keyring.U1_KEY_ATTR,
229 secret, True)215 secret, True)
230216

Subscribers

People subscribed via source and target branches

to all changes: