xrange() -> range()
This commit is contained in:
parent
005a131440
commit
24a872885a
3 changed files with 4 additions and 4 deletions
|
@ -101,7 +101,7 @@ class FullStreamProgressManager(StreamProgressManager):
|
|||
if not blobs:
|
||||
return 0
|
||||
else:
|
||||
for i in xrange(max(blobs.iterkeys())):
|
||||
for i in range(max(blobs.iterkeys())):
|
||||
if self._done(i, blobs):
|
||||
return i
|
||||
return max(blobs.iterkeys()) + 1
|
||||
|
|
|
@ -81,7 +81,7 @@ class TestReflector(unittest.TestCase):
|
|||
return d
|
||||
|
||||
def create_stream():
|
||||
test_file = mocks.GenFile(5209343, b''.join([chr(i + 3) for i in xrange(0, 64, 6)]))
|
||||
test_file = mocks.GenFile(5209343, b''.join([chr(i + 3) for i in range(0, 64, 6)]))
|
||||
d = EncryptedFileCreator.create_lbry_file(
|
||||
self.client_blob_manager, self.client_storage, prm, self.client_lbry_file_manager,
|
||||
"test_file",
|
||||
|
|
|
@ -81,7 +81,7 @@ class TestStreamify(TestCase):
|
|||
yield "%016d" % iv
|
||||
|
||||
def create_stream():
|
||||
test_file = GenFile(5209343, b''.join([chr(i + 3) for i in xrange(0, 64, 6)]))
|
||||
test_file = GenFile(5209343, b''.join([chr(i + 3) for i in range(0, 64, 6)]))
|
||||
d = create_lbry_file(
|
||||
self.blob_manager, self.storage, self.prm, self.lbry_file_manager, "test_file", test_file,
|
||||
key="0123456701234567", iv_generator=iv_generator()
|
||||
|
@ -95,7 +95,7 @@ class TestStreamify(TestCase):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def test_create_and_combine_stream(self):
|
||||
test_file = GenFile(53209343, b''.join([chr(i + 5) for i in xrange(0, 64, 6)]))
|
||||
test_file = GenFile(53209343, b''.join([chr(i + 5) for i in range(0, 64, 6)]))
|
||||
lbry_file = yield create_lbry_file(self.blob_manager, self.storage, self.prm, self.lbry_file_manager,
|
||||
"test_file", test_file)
|
||||
sd_hash = yield self.storage.get_sd_blob_hash_for_stream(lbry_file.stream_hash)
|
||||
|
|
Loading…
Reference in a new issue