]> arthur.barton.de Git - bup.git/blobdiff - cmd/margin-cmd.py
fsck: only specify -t1 when par2 appears to support it
[bup.git] / cmd / margin-cmd.py
index ca502b90cd9768fbb95815b7a25e903e6b759c6a..b01db3d1864e151fe7e74059b024f3eb08be1ebd 100755 (executable)
@@ -5,6 +5,7 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
+from __future__ import absolute_import, print_function
 import sys, struct, math
 
 from bup import options, git, _helpers
@@ -37,7 +38,7 @@ def do_predict(ix):
         expected = prefix * total / (1<<64)
         diff = count - expected
         maxdiff = max(maxdiff, abs(diff))
-    print '%d of %d (%.3f%%) ' % (maxdiff, len(ix), maxdiff*100.0/len(ix))
+    print('%d of %d (%.3f%%) ' % (maxdiff, len(ix), maxdiff*100.0/len(ix)))
     sys.stdout.flush()
     assert(count+1 == len(ix))
 
@@ -58,7 +59,7 @@ else:
         pm = _helpers.bitmatch(last, i)
         longmatch = max(longmatch, pm)
         last = i
-    print longmatch
+    print(longmatch)
     log('%d matching prefix bits\n' % longmatch)
     doublings = math.log(len(mi), 2)
     bpd = longmatch / doublings