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 /subcmds/status.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 'subcmds/status.py')
-rw-r--r-- | subcmds/status.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subcmds/status.py b/subcmds/status.py index 41c4429a..b42675e0 100644 --- a/subcmds/status.py +++ b/subcmds/status.py | |||
@@ -113,7 +113,7 @@ the following meanings: | |||
113 | try: | 113 | try: |
114 | state = project.PrintWorkTreeStatus(output) | 114 | state = project.PrintWorkTreeStatus(output) |
115 | if state == 'CLEAN': | 115 | if state == 'CLEAN': |
116 | clean_counter.next() | 116 | next(clean_counter) |
117 | finally: | 117 | finally: |
118 | sem.release() | 118 | sem.release() |
119 | 119 | ||
@@ -141,7 +141,7 @@ the following meanings: | |||
141 | for project in all_projects: | 141 | for project in all_projects: |
142 | state = project.PrintWorkTreeStatus() | 142 | state = project.PrintWorkTreeStatus() |
143 | if state == 'CLEAN': | 143 | if state == 'CLEAN': |
144 | counter.next() | 144 | next(counter) |
145 | else: | 145 | else: |
146 | sem = _threading.Semaphore(opt.jobs) | 146 | sem = _threading.Semaphore(opt.jobs) |
147 | threads_and_output = [] | 147 | threads_and_output = [] |
@@ -164,7 +164,7 @@ the following meanings: | |||
164 | t.join() | 164 | t.join() |
165 | output.dump(sys.stdout) | 165 | output.dump(sys.stdout) |
166 | output.close() | 166 | output.close() |
167 | if len(all_projects) == counter.next(): | 167 | if len(all_projects) == next(counter): |
168 | print('nothing to commit (working directory clean)') | 168 | print('nothing to commit (working directory clean)') |
169 | 169 | ||
170 | if opt.orphans: | 170 | if opt.orphans: |