Skip to content

Commit e90707e

Browse files
committed
Fix quit and improve logs
1 parent d2a0f10 commit e90707e

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

tools/config_editor/app.py

+13-12
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def on_button_pressed(self, event: Button.Pressed) -> None:
5959
self.app.push_screen("editor")
6060
elif event.button.id == "quit-button":
6161
print("Quit button pressed")
62-
quit()
62+
self.app.exit()
6363

6464
def compose(self) -> ComposeResult:
6565
# Compose main menu
@@ -75,17 +75,7 @@ def on_mount(self) -> None:
7575
# Event handler called when the app is mounted for the first time
7676
self.title = "Configurator"
7777
self.sub_title = "Main Menu"
78-
print("Using Python version: " + sys.version)
79-
print("App started. Initial Options:")
80-
print("Root path: " + self.app.ROOT_PATH)
81-
print("Script path: " + self.app.SCRIPT_PATH)
82-
print("Target: " + str(self.app.setting_target))
83-
print("Enable Copy: " + str(self.app.setting_enable_copy))
84-
print("Arduino Path: " + str(self.app.setting_arduino_path))
85-
print("Arduino Branch: " + str(self.app.setting_arduino_branch))
86-
print("IDF Branch: " + str(self.app.setting_idf_branch))
87-
print("IDF Commit: " + str(self.app.setting_idf_commit))
88-
print("IDF Debug Level: " + str(self.app.setting_debug_level))
78+
print("Main screen mounted.")
8979

9080
class ConfigEditorApp(App):
9181
# Main application class
@@ -115,6 +105,17 @@ class ConfigEditorApp(App):
115105
}
116106

117107
def on_mount(self) -> None:
108+
print("Application mounted. Initial options:")
109+
print("Python version: " + sys.version)
110+
print("Root path: " + self.ROOT_PATH)
111+
print("Script path: " + self.SCRIPT_PATH)
112+
print("Target: " + str(self.setting_target))
113+
print("Enable Copy: " + str(self.setting_enable_copy))
114+
print("Arduino Path: " + str(self.setting_arduino_path))
115+
print("Arduino Branch: " + str(self.setting_arduino_branch))
116+
print("IDF Branch: " + str(self.setting_idf_branch))
117+
print("IDF Commit: " + str(self.setting_idf_commit))
118+
print("IDF Debug Level: " + str(self.setting_debug_level))
118119
self.push_screen("main")
119120

120121
def arduino_default_path():

0 commit comments

Comments
 (0)