summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/toaster-eventreplay
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin/toaster-eventreplay')
-rwxr-xr-xbitbake/bin/toaster-eventreplay13
1 files changed, 4 insertions, 9 deletions
diff --git a/bitbake/bin/toaster-eventreplay b/bitbake/bin/toaster-eventreplay
index 624829aea0..615a7aed15 100755
--- a/bitbake/bin/toaster-eventreplay
+++ b/bitbake/bin/toaster-eventreplay
@@ -26,6 +26,7 @@
26# as a build eventlog, and the ToasterUI is used to process events in the file 26# as a build eventlog, and the ToasterUI is used to process events in the file
27# and log data in the database 27# and log data in the database
28 28
29from __future__ import print_function
29import os 30import os
30import sys, logging 31import sys, logging
31 32
@@ -39,12 +40,6 @@ from bb.ui import toasterui
39import sys 40import sys
40import logging 41import logging
41 42
42logger = logging.getLogger(__name__)
43console = logging.StreamHandler(sys.stdout)
44format_str = "%(levelname)s: %(message)s"
45logging.basicConfig(format=format_str)
46
47
48import json, pickle 43import json, pickle
49 44
50 45
@@ -168,12 +163,12 @@ class MockConfigParameters():
168# run toaster ui on our mock bitbake class 163# run toaster ui on our mock bitbake class
169if __name__ == "__main__": 164if __name__ == "__main__":
170 if len(sys.argv) < 2: 165 if len(sys.argv) < 2:
171 logger.error("Usage: %s event.log " % sys.argv[0]) 166 print("Usage: %s event.log " % sys.argv[0])
172 sys.exit(1) 167 sys.exit(1)
173 168
174 file_name = sys.argv[-1] 169 file_name = sys.argv[-1]
175 mock_connection = FileReadEventsServerConnection(file_name) 170 mock_connection = FileReadEventsServerConnection(file_name)
176 configParams = MockConfigParameters() 171 configParams = MockConfigParameters()
177 172
178 # run the main program 173 # run the main program and set exit code to the returned value
179 toasterui.main(mock_connection.connection, mock_connection.events, configParams) 174 sys.exit(toasterui.main(mock_connection.connection, mock_connection.events, configParams))