summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-12-01 10:40:40 +0000
committerLars Wirzenius <liw@liw.fi>2010-12-01 10:40:40 +0000
commitd444a40383d3915e39a22204e067665b9984a3c0 (patch)
tree65a01a48736fff9f0d6a5826a5d9bb0d5e9f395e
parent42ed96e208d924cd0bcbaa42bf7a42a071d6c790 (diff)
downloadgenbackupdata-d444a40383d3915e39a22204e067665b9984a3c0.tar.gz
Use xrange rather than range, seems to be a tiny bit faster.
-rw-r--r--binaryjunk.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/binaryjunk.py b/binaryjunk.py
index cc2a26c..5519454 100644
--- a/binaryjunk.py
+++ b/binaryjunk.py
@@ -72,7 +72,7 @@ def sha1ofgetrandbits2(size):
chunks = []
sum = hashlib.sha1()
chunk_size = len(sum.digest())
- for i in range(size / chunk_size):
+ for i in xrange(size / chunk_size):
sum.update(chr(random.getrandbits(8)))
chunk = sum.digest()
chunks.append(chunk)