diff options
author | Eli Ribble <eliribble@google.com> | 2018-12-18 21:21:12 -0800 |
---|---|---|
committer | Eli Ribble <eliribble@google.com> | 2018-12-19 11:06:35 -0800 |
commit | d4b13c280b5cabd19899b0a6f53ef9041f9d01aa (patch) | |
tree | 53e2af9c86f4d9043c81cadfab894ea0b87ca2ad /event_log.py | |
parent | 6e53844f1edd3c9a3898f0af74fcc8da04b7de48 (diff) | |
download | git-repo-d4b13c280b5cabd19899b0a6f53ef9041f9d01aa.tar.gz |
Leverage the next keyword from python 2.7
This is literally what the next keyword is for.
https://www.python.org/dev/peps/pep-3114/
Change-Id: I843755910b847737b077ff2361ba3e04409db0f0
Diffstat (limited to 'event_log.py')
-rw-r--r-- | event_log.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/event_log.py b/event_log.py index 2f1b180b..508b18ee 100644 --- a/event_log.py +++ b/event_log.py | |||
@@ -18,8 +18,6 @@ from __future__ import print_function | |||
18 | import json | 18 | import json |
19 | import multiprocessing | 19 | import multiprocessing |
20 | 20 | ||
21 | from pyversion import is_python3 | ||
22 | |||
23 | TASK_COMMAND = 'command' | 21 | TASK_COMMAND = 'command' |
24 | TASK_SYNC_NETWORK = 'sync-network' | 22 | TASK_SYNC_NETWORK = 'sync-network' |
25 | TASK_SYNC_LOCAL = 'sync-local' | 23 | TASK_SYNC_LOCAL = 'sync-local' |
@@ -73,7 +71,7 @@ class EventLog(object): | |||
73 | A dictionary of the event added to the log. | 71 | A dictionary of the event added to the log. |
74 | """ | 72 | """ |
75 | event = { | 73 | event = { |
76 | 'id': (kind, self._next_id.__next__() if is_python3() else self._next_id.next()), | 74 | 'id': (kind, next(self._next_id)), |
77 | 'name': name, | 75 | 'name': name, |
78 | 'task_name': task_name, | 76 | 'task_name': task_name, |
79 | 'start_time': start, | 77 | 'start_time': start, |