Permalink
Browse files

bloom-cmd: don't explicitly create the bloom file (allow bloom.create…

…()).

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>
  • Loading branch information...
1 parent 572810f commit 41d973cb6e9bf0721ebd04970013b4ab16be2fa2 @pfrouleau pfrouleau committed with rlbdv Feb 13, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 cmd/bloom-cmd.py
View
@@ -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:

0 comments on commit 41d973c

Please sign in to comment.