Skip to content

Commit a29fd7e

Browse files
committed
Fix #1 type error when reading byte
Signed-off-by: Rinat Sabitov <[email protected]>
1 parent 71d76a1 commit a29fd7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kc-compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _get_last_byte_from(filename):
4444
:return: last byte in a file as unsigned int or None if file was empty
4545
"""
4646
with open(filename, 'rb') as f:
47-
last, = struct.unpack("B", f.read()[-1])
47+
last, = struct.unpack("B", f.read()[-1:])
4848
return last
4949

5050

0 commit comments

Comments
 (0)