##// END OF EJS Templates
wireprotov2peer: use our CBOR decoder...
Gregory Szorc -
r39481:9f51fd22 default
parent child Browse files
Show More
@@ -8,15 +8,15 b''
8 8 from __future__ import absolute_import
9 9
10 10 from .i18n import _
11 from .thirdparty import (
12 cbor,
13 )
14 11 from . import (
15 12 encoding,
16 13 error,
17 14 util,
18 15 wireprotoframing,
19 16 )
17 from .utils import (
18 cborutil,
19 )
20 20
21 21 def formatrichmessage(atoms):
22 22 """Format an encoded message from the framing protocol."""
@@ -44,13 +44,10 b' class commandresponse(object):'
44 44
45 45 def cborobjects(self):
46 46 """Obtain decoded CBOR objects from this response."""
47 size = self.b.tell()
48 47 self.b.seek(0)
49 48
50 decoder = cbor.CBORDecoder(self.b)
51
52 while self.b.tell() < size:
53 yield decoder.decode()
49 for v in cborutil.decodeall(self.b.getvalue()):
50 yield v
54 51
55 52 class clienthandler(object):
56 53 """Object to handle higher-level client activities.
General Comments 0
You need to be logged in to leave comments. Login now