From d4b13c280b5cabd19899b0a6f53ef9041f9d01aa Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 18 Dec 2018 21:21:12 -0800 Subject: 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 --- event_log.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'event_log.py') 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 import json import multiprocessing -from pyversion import is_python3 - TASK_COMMAND = 'command' TASK_SYNC_NETWORK = 'sync-network' TASK_SYNC_LOCAL = 'sync-local' @@ -73,7 +71,7 @@ class EventLog(object): A dictionary of the event added to the log. """ event = { - 'id': (kind, self._next_id.__next__() if is_python3() else self._next_id.next()), + 'id': (kind, next(self._next_id)), 'name': name, 'task_name': task_name, 'start_time': start, -- cgit v1.2.3-54-g00ecf