~ubuntuone-control-tower/ubuntu-sso-client/trunk

« back to all changes in this revision

Viewing changes to ubuntu_sso/utils/webclient/qtnetwork.py

  • Committer: Tarmac
  • Author(s): Alejandro J. Cura
  • Date: 2012-03-18 20:53:35 UTC
  • mfrom: (920.1.1 fix-wrong-credentials)
  • Revision ID: tarmac-20120318205335-x011hv9qnd2kqvk0
- Handle wrong credentials properly in qtnetwork webclient (LP: #957317)

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
 
189
189
    def _handle_authentication(self, reply, authenticator):
190
190
        """The reply needs authentication."""
191
 
        authenticator.setUser(self.username)
192
 
        authenticator.setPassword(self.password)
 
191
        if authenticator.user() != self.username:
 
192
            authenticator.setUser(self.username)
 
193
        if authenticator.password() != self.password:
 
194
            authenticator.setPassword(self.password)
193
195
 
194
196
    @defer.inlineCallbacks
195
197
    def _handle_bad_proxy_authentication(self, proxy, authenticator):