Correcting CLI handling of main() for issue
The idiom for handling main() was incorrect to allow the CLI
to be invoked by the mycroft-cli-clent script.
==== Fixed Issues ====
@@ -653,7 +653,7 @@ def handle_cmd(cmd):
return 0 # do nothing upon return
-def main(stdscr):
+def gui_main(stdscr):
global scr
global ws
global line
@@ -829,13 +829,17 @@ start_log_monitor("/var/log/mycroft-speech-client.log")
# Monitor IPC file containing microphone level info
start_mic_monitor(os.path.join(get_ipc_directory(), "mic_level"))
-if __name__ == "__main__":
+
+def main():
if bSimple:
sys.stdout = sys.__stdout__
sys.stderr = sys.__stderr__
simple_cli()
else:
load_settings()
- curses.wrapper(main)
+ curses.wrapper(gui_main)
curses.endwin()
save_settings()
+
+if __name__ == "__main__":
+ main()
