]> arthur.barton.de Git - bup.git/blobdiff - cmd/memtest-cmd.py
Add missing space in bup split --bench output.
[bup.git] / cmd / memtest-cmd.py
index 65778b73de374829c1a8eb30e7b74a0c61bac60a..894bb64366a20543cc50d2bcce3874871ca3eec3 100755 (executable)
@@ -4,12 +4,17 @@ bup_python="$(dirname "$0")/bup-python" || exit $?
 exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
+
+from __future__ import absolute_import
 import sys, re, struct, time, resource
+
 from bup import git, bloom, midx, options, _helpers
-from bup.helpers import *
+from bup.helpers import handle_ctrl_c
+
 
 handle_ctrl_c()
 
+
 _linux_warned = 0
 def linux_memstat():
     global _linux_warned
@@ -17,7 +22,7 @@ def linux_memstat():
     d = {}
     try:
         f = open('/proc/self/status')
-    except IOError, e:
+    except IOError as e:
         if not _linux_warned:
             log('Warning: %s\n' % e)
             _linux_warned = 1
@@ -96,7 +101,7 @@ if opt.existing:
 for c in xrange(opt.cycles):
     for n in xrange(opt.number):
         if opt.existing:
-            bin = objit.next()
+            bin = next(objit)
             assert(m.exists(bin))
         else:
             bin = _helpers.random_sha()