Python 3: Replace iter.next() with six.next(iter)
Use six.next() to be Python 3 compatible. Change-Id: Ia16148a759d368872787d5896a7b1dc42ffcdfb5
This commit is contained in:
parent
100419c0b3
commit
46d62bd9be
@ -92,7 +92,7 @@ def fake_http_connect(*code_iter, **kwargs):
|
||||
if not self.timestamp:
|
||||
del headers['x-timestamp']
|
||||
try:
|
||||
if container_ts_iter.next() is False:
|
||||
if next(container_ts_iter) is False:
|
||||
headers['x-container-timestamp'] = '1'
|
||||
except StopIteration:
|
||||
pass
|
||||
@ -141,9 +141,9 @@ def fake_http_connect(*code_iter, **kwargs):
|
||||
kwargs['give_content_type']('')
|
||||
if 'give_connect' in kwargs:
|
||||
kwargs['give_connect'](*args, **ckwargs)
|
||||
status = code_iter.next()
|
||||
etag = etag_iter.next()
|
||||
timestamp = timestamps_iter.next()
|
||||
status = next(code_iter)
|
||||
etag = next(etag_iter)
|
||||
timestamp = next(timestamps_iter)
|
||||
if status <= 0:
|
||||
raise RequestException()
|
||||
fake_conn = FakeConn(status, etag, body=kwargs.get('body', ''),
|
||||
|
Loading…
x
Reference in New Issue
Block a user