~mvo/ubuntu-sso-client/strawman-lp711413

« back to all changes in this revision

Viewing changes to ubuntu_sso/credentials.py

  • Committer: Tarmac
  • Author(s): Natalia B. Bidart
  • Date: 2012-01-03 16:42:41 UTC
  • mfrom: (817.1.2 stable-3-0-update-2.99.1)
  • Revision ID: tarmac-20120103164241-rqsol4hqbrbvc5i8
[ Guillermo Gonzalez <guillermo.gonzalez@canonical.com> ]
  - Remove _ping_url inlineCallbacks and make it return a deferred in order to
    make it work with twisted 11.1 (LP: #910163).
[ Rodney Dawes <rodney.dawes@canonical.com> ]
  - Disable a lint warning, to prevent builds failing on Lucid

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
from functools import wraps
45
45
 
 
46
from twisted.internet import defer
46
47
from twisted.internet.defer import inlineCallbacks, returnValue
47
48
 
48
49
from ubuntu_sso import NO_OP, utils
216
217
        self.denial_cb(app_name)
217
218
 
218
219
    @handle_failures(msg='Problem opening the ping_url')
219
 
    @inlineCallbacks
220
220
    def _ping_url(self, app_name, email, credentials):
221
221
        """Ping the self.ping_url with the email attached.
222
222
 
245
245
        # but the returned deferred will never be fired (nataliabidart).
246
246
        response = urllib2.urlopen(request)
247
247
        logger.debug('Url opened. Response: %s.', response.code)
248
 
        returnValue(response)
 
248
        return defer.succeed(response)
249
249
 
250
250
    @handle_exceptions(msg='Problem opening the Ubuntu SSO user interface')
251
251
    def _show_ui(self, login_only):