mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Fix the missing unpack function in mmdb-convert.py
This commit is contained in:
parent
391756f262
commit
b0c41e3ec2
@ -77,7 +77,7 @@ def to_int32(s):
|
||||
|
||||
def to_int28(s):
|
||||
"Parse a pair of big-endian 28-bit integers from bytestring s."
|
||||
a, b = unpack("!LL", s + b'\x00')
|
||||
a, b = struct.unpack("!LL", s + b'\x00')
|
||||
return (((a & 0xf0) << 20) + (a >> 8)), ((a & 0x0f) << 24) + (b >> 8)
|
||||
|
||||
class Tree(object):
|
||||
|
Loading…
Reference in New Issue
Block a user