mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
close spinner when manager fails to start
old-commit-hash: 631059d9317c062e94376f721e10f33d70983aaa
This commit is contained in:
@@ -107,8 +107,7 @@ if not prebuilt:
|
||||
prefix = b'progress: '
|
||||
if line.startswith(prefix):
|
||||
i = int(line[len(prefix):])
|
||||
if spinner is not None:
|
||||
spinner.update("%d" % (70.0 * (i / TOTAL_SCONS_NODES)))
|
||||
spinner.update("%d" % (70.0 * (i / TOTAL_SCONS_NODES)))
|
||||
elif len(line):
|
||||
compile_output.append(line)
|
||||
print(line.decode('utf8', 'replace'))
|
||||
@@ -141,10 +140,10 @@ if not prebuilt:
|
||||
cloudlog.error("scons build failed\n" + error_s)
|
||||
|
||||
# Show TextWindow
|
||||
spinner.close()
|
||||
error_s = "\n \n".join(["\n".join(textwrap.wrap(e, 65)) for e in errors])
|
||||
with TextWindow("openpilot failed to build\n \n" + error_s) as t:
|
||||
t.wait_for_exit()
|
||||
|
||||
exit(1)
|
||||
else:
|
||||
break
|
||||
@@ -609,6 +608,7 @@ if __name__ == "__main__":
|
||||
# Show last 3 lines of traceback
|
||||
error = traceback.format_exc(-3)
|
||||
error = "Manager failed to start\n \n" + error
|
||||
spinner.close()
|
||||
with TextWindow(error) as t:
|
||||
t.wait_for_exit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user