]> arthur.barton.de Git - bup.git/commitdiff
bloom-cmd: don't explicitly create the bloom file (allow bloom.create()).
authorPatrick Rouleau <prouleau72@gmail.com>
Wed, 13 Feb 2013 03:46:13 +0000 (22:46 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 16 Feb 2013 00:41:52 +0000 (18:41 -0600)
Don't explicitly create the bloom file since bloom.create() will
handle it, and will actually use the correct (binary) mode instead of
"w+".

The binary mode has no effect under Linux or Cygwin, but is important
under Windows.

Signed-off-by: Patrick Rouleau <prouleau72@gmail.com>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
cmd/bloom-cmd.py

index 51e594bdf11784c24c63ac60714b7f9b85d0017b..e6a73752dbb9796f1da969cea9d300726f55681f 100755 (executable)
@@ -109,8 +109,7 @@ def do_bloom(path, outfilename):
     tfname = None
     if b is None:
         tfname = os.path.join(path, 'bup.tmp.bloom')
-        tf = open(tfname, 'w+')
-        b = bloom.create(tfname, f=tf, expected=add_count, k=opt.k)
+        b = bloom.create(tfname, expected=add_count, k=opt.k)
     count = 0
     icount = 0
     for name in add: