to_bytes() named argument 'length' removed for PyPy (#834)

This commit is contained in:
Vaschuk Maxim 2018-06-04 13:34:52 +03:00 committed by Lonami
parent 2e43fb3217
commit 3db104c7bc

View File

@ -28,7 +28,7 @@ def get_byte_array(integer):
# Reference: https://core.telegram.org/mtproto/auth_key # Reference: https://core.telegram.org/mtproto/auth_key
return int.to_bytes( return int.to_bytes(
integer, integer,
length=(integer.bit_length() + 8 - 1) // 8, # 8 bits per byte, (integer.bit_length() + 8 - 1) // 8, # 8 bits per byte,
byteorder='big', byteorder='big',
signed=False signed=False
) )