Skip to content

Commit 7603351

Browse files
author
Ross Nicoll
committed
Correct error message in ser_read
Adds missing number of bytes to error message when too many bytes are requested in a single read.
1 parent 22d0256 commit 7603351

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bitcoin/core/serialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def ser_read(f, n):
7575
functions.
7676
"""
7777
if n > MAX_SIZE:
78-
raise SerializationError('Asked to read 0x%x bytes; MAX_SIZE exceeded')
78+
raise SerializationError('Asked to read 0x%x bytes; MAX_SIZE exceeded' % n)
7979
r = f.read(n)
8080
if len(r) < n:
8181
raise SerializationTruncationError('Asked to read %i bytes, but only got %i' % (n, len(r)))

0 commit comments

Comments
 (0)