diff options
author | Anthony King <anthonydking@slimroms.net> | 2014-05-05 21:24:05 +0100 |
---|---|---|
committer | Anthony King <anthonydking@slimroms.net> | 2014-05-07 08:44:20 +0100 |
commit | 2cd1f0452eb746ae727218f5dbda0fd1ae0b2e34 (patch) | |
tree | dd8ee9139452c6eb3c759f199cab78d762545cdf /project.py | |
parent | 65e3a78a9e9336dae396cef09b8b23621f4bdc6e (diff) | |
download | git-repo-2cd1f0452eb746ae727218f5dbda0fd1ae0b2e34.tar.gz |
Use next(iterator) rather than iterator.next()
iterator.next() was replaced with iterator.__next__() in Python 3.
Use next(iterator) instead which will select the correct method for
returning the next item.
Change-Id: I6d0c89c8b32e817e5897fe87332933dacf22027b
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2321,8 +2321,8 @@ class Project(object): | |||
2321 | out = iter(out[:-1].split('\0')) # pylint: disable=W1401 | 2321 | out = iter(out[:-1].split('\0')) # pylint: disable=W1401 |
2322 | while out: | 2322 | while out: |
2323 | try: | 2323 | try: |
2324 | info = out.next() | 2324 | info = next(out) |
2325 | path = out.next() | 2325 | path = next(out) |
2326 | except StopIteration: | 2326 | except StopIteration: |
2327 | break | 2327 | break |
2328 | 2328 | ||
@@ -2348,7 +2348,7 @@ class Project(object): | |||
2348 | info = _Info(path, *info) | 2348 | info = _Info(path, *info) |
2349 | if info.status in ('R', 'C'): | 2349 | if info.status in ('R', 'C'): |
2350 | info.src_path = info.path | 2350 | info.src_path = info.path |
2351 | info.path = out.next() | 2351 | info.path = next(out) |
2352 | r[info.path] = info | 2352 | r[info.path] = info |
2353 | return r | 2353 | return r |
2354 | finally: | 2354 | finally: |