dev@locazia: fix math
This commit is contained in:
parent
cc8b830260
commit
b80e070b4d
|
|
@ -44,10 +44,10 @@ class ContentId:
|
|||
)
|
||||
if not (self.safe_onchain_index is None):
|
||||
oi_bin_hex = hex(self.safe_onchain_index)[2:]
|
||||
if len(oi_bin_hex) % 2:
|
||||
if len(oi_bin_hex) % 2 == 1:
|
||||
oi_bin_hex = '0' + oi_bin_hex
|
||||
|
||||
oi_bin_len = len(oi_bin_hex) / 2
|
||||
oi_bin_len = len(oi_bin_hex) // 2
|
||||
cid_bin += b'\xb0' + oi_bin_len.to_bytes(1, 'big') + bytes.fromhex(oi_bin_hex)
|
||||
if self.accept_type and include_accept_type:
|
||||
at_bin_len = len(self.accept_type.encode())
|
||||
|
|
|
|||
Loading…
Reference in New Issue