]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix the missing unpack function in mmdb-convert.py
authorJay Bitron <jaybitron@gmail.com>
Wed, 10 Oct 2018 21:12:53 +0000 (14:12 -0700)
committerGitHub <noreply@github.com>
Wed, 10 Oct 2018 21:12:53 +0000 (14:12 -0700)
src/config/mmdb-convert.py

index 3a454a3fc1bb87b6c4850825f421ac0b0f2b32a3..706a8b03cc05339b2ab0d7086113229ae29f9fcd 100644 (file)
@@ -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):