Fix Python code: remove imports from `python-future`.
[oweals/gnunet.git] / contrib / scripts / gnunet-chk.py.in
index ab0bc635f96fc03db1488682c75dddb43ef66303..0fb591627f124fff9738c8a5e18bc4832fdb0127 100755 (executable)
 # Brief:   Computes GNUNET style Content Hash Key for a given file
 # Author:  Sree Harsha Totakura
 
-from builtins import str
-from builtins import range
-from past.utils import old_div
-from builtins import object
 from hashlib import sha512
 import logging
 import os
@@ -252,7 +248,7 @@ def compute_chk_offset_(depth, end_offset):
     bds = compute_tree_size_(depth)
     if (depth > 0):
         end_offset -= 1
-    ret = old_div(end_offset, bds)
+    ret = end_offset // bds
     return ret % CHK_PER_INODE
 
 
@@ -276,7 +272,7 @@ def compute_iblock_size_(depth, offset):
         ret = CHK_PER_INODE
     else:
         bds /= CHK_PER_INODE
-        ret = old_div(mod, bds)
+        ret = mod // bds
         if (mod % bds) is not 0:
             ret += 1
     return ret