summaryrefslogtreecommitdiffstats
path: root/event_log.py
diff options
context:
space:
mode:
authorDylan Deng <dxx1104@gmail.com>2018-06-23 15:02:26 +0800
committerDylan Deng <dxx1104@gmail.com>2018-07-24 22:20:08 +0800
commite469a0c741832f6584513f4a382d6b93f417b8d2 (patch)
tree4ea43078d29bb494fb6688cf75f2a1d03e936d5a /event_log.py
parent65b0ba5aa0447f7ee25103828115662b1eb80ff9 (diff)
downloadgit-repo-e469a0c741832f6584513f4a382d6b93f417b8d2.tar.gz
fix some sync error while using python3
Change-Id: I70925e48756c356d48359679d8ad1b9e33a68595
Diffstat (limited to 'event_log.py')
-rw-r--r--event_log.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/event_log.py b/event_log.py
index 45a2c268..2f1b180b 100644
--- a/event_log.py
+++ b/event_log.py
@@ -18,6 +18,8 @@ from __future__ import print_function
18import json 18import json
19import multiprocessing 19import multiprocessing
20 20
21from pyversion import is_python3
22
21TASK_COMMAND = 'command' 23TASK_COMMAND = 'command'
22TASK_SYNC_NETWORK = 'sync-network' 24TASK_SYNC_NETWORK = 'sync-network'
23TASK_SYNC_LOCAL = 'sync-local' 25TASK_SYNC_LOCAL = 'sync-local'
@@ -71,7 +73,7 @@ class EventLog(object):
71 A dictionary of the event added to the log. 73 A dictionary of the event added to the log.
72 """ 74 """
73 event = { 75 event = {
74 'id': (kind, self._next_id.next()), 76 'id': (kind, self._next_id.__next__() if is_python3() else self._next_id.next()),
75 'name': name, 77 'name': name,
76 'task_name': task_name, 78 'task_name': task_name,
77 'start_time': start, 79 'start_time': start,