Merge PR 1251 into v0.6

This commit is contained in:
Peter Šurda 2018-05-18 12:37:45 +02:00
commit de27c9082d
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -334,7 +334,7 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
self.object = BMObject(nonce, expiresTime, objectType, version, streamNumber, self.payload, self.payloadOffset) self.object = BMObject(nonce, expiresTime, objectType, version, streamNumber, self.payload, self.payloadOffset)
if len(self.payload) - self.payloadOffset > BMProto.maxObjectPayloadSize: if len(self.payload) - self.payloadOffset > BMProto.maxObjectPayloadSize:
logger.info('The payload length of this object is too large (%s bytes). Ignoring it.' % len(self.payload) - self.payloadOffset) logger.info('The payload length of this object is too large (%d bytes). Ignoring it.' % (len(self.payload) - self.payloadOffset))
raise BMProtoExcessiveDataError() raise BMProtoExcessiveDataError()
try: try: