~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smtp_connection.py

  • Committer: John Arbash Meinel
  • Date: 2009-03-27 22:29:55 UTC
  • mto: (3735.39.2 clean)
  • mto: This revision was merged to the branch mainline in revision 4280.
  • Revision ID: john@arbash-meinel.com-20090327222955-utifmfm888zerixt
Implement apply_delta_to_source which doesn't have to malloc another string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
            return
65
65
 
66
66
        self._create_connection()
67
 
        # FIXME: _authenticate() should only be called when the server has
68
 
        # refused unauthenticated access, so it can safely try to authenticate 
69
 
        # with the default username. JRV20090407
70
67
        self._authenticate()
71
68
 
72
69
    def _create_connection(self):
106
103
        """If necessary authenticate yourself to the server."""
107
104
        auth = config.AuthenticationConfig()
108
105
        if self._smtp_username is None:
109
 
            # FIXME: Since _authenticate gets called even when no authentication
110
 
            # is necessary, it's not possible to use the default username 
111
 
            # here yet.
112
106
            self._smtp_username = auth.get_user('smtp', self._smtp_server)
113
107
            if self._smtp_username is None:
114
108
                return