~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/protocol.py

  • Committer: Vincent Ladeuil
  • Date: 2009-05-05 15:31:34 UTC
  • mto: (4343.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4344.
  • Revision ID: v.ladeuil+lp@free.fr-20090505153134-q4bp4is9gywsmzrv
Clean up test for log formats.

* bzrlib/tests/blackbox/test_logformats.py:
Update tests to actual style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib import errors
30
30
from bzrlib.smart import message, request
31
31
from bzrlib.trace import log_exception_quietly, mutter
32
 
from bzrlib.bencode import bdecode_as_tuple, bencode
 
32
from bzrlib.util.bencode import bdecode_as_tuple, bencode
33
33
 
34
34
 
35
35
# Protocol version strings.  These are sent as prefixes of bzr requests and
897
897
            # We do *not* set self.decoding_failed here.  The message handler
898
898
            # has raised an error, but the decoder is still able to parse bytes
899
899
            # and determine when this message ends.
900
 
            if not isinstance(exception.exc_value, errors.UnknownSmartMethod):
901
 
                log_exception_quietly()
 
900
            log_exception_quietly()
902
901
            self.message_handler.protocol_error(exception.exc_value)
903
902
            # The state machine is ready to continue decoding, but the
904
903
            # exception has interrupted the loop that runs the state machine.
1037
1036
            raise errors.SmartMessageHandlerError(sys.exc_info())
1038
1037
 
1039
1038
    def _state_accept_reading_unused(self):
1040
 
        self.unused_data += self._get_in_buffer()
 
1039
        self.unused_data = self._get_in_buffer()
1041
1040
        self._set_in_buffer(None)
1042
1041
 
1043
1042
    def next_read_size(self):