Skip to content

Commit

Permalink
Changed Filename from Hash to Seed
Browse files Browse the repository at this point in the history
  • Loading branch information
super3 committed Aug 4, 2015
1 parent 26dc9e2 commit 748f95b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/Builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def generate_shard(self, seed, store_path, cleanup=False):
"""Save a shard, and return its SHA-256 hash."""
tmp_file = RandomIO.RandomIO(seed).read(self.shard_size) # temporarily generate file
file_hash = hashlib.sha256(tmp_file).hexdigest() # get SHA-256 hash
RandomIO.RandomIO(seed).genfile(self.shard_size, store_path+file_hash) # save the shard
RandomIO.RandomIO(seed).genfile(self.shard_size, store_path+seed) # save the shard
if cleanup:
os.remove(store_path+file_hash)
os.remove(store_path+seed)
return file_hash

def build(self, store_path, debug=False, cleanup=False):
Expand Down

0 comments on commit 748f95b

Please sign in to comment.