~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/message.py

  • Committer: Andrew Bennetts
  • Date: 2008-05-14 07:35:27 UTC
  • mto: This revision was merged to the branch mainline in revision 3428.
  • Revision ID: andrew.bennetts@canonical.com-20080514073527-u6oe3rj6v0v95z8m
Clarify the code a little.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        self.args_received = False
94
94
 
95
95
    def protocol_error(self, exception):
96
 
        if not self.responder.response_sent:
97
 
            self.responder.send_error(exception)
 
96
        if self.responder.response_sent:
 
97
            # We can only send one response to a request, no matter how many
 
98
            # errors happen while processing it.
 
99
            return
 
100
        self.responder.send_error(exception)
98
101
 
99
102
    def byte_part_received(self, byte):
100
103
        raise errors.SmartProtocolError(