Skip to content

Commit 9eb0116

Browse files
committed
fix: when choose a blank firmware file path, thonny will block seconds.
1 parent 3ca1790 commit 9eb0116

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

thonnycontrib/quecpython/view.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ def get_validated_com_port(self, firmware_file_path):
208208

209209
def ask_for_firmware_file_path(self):
210210
firmware_file_path = filedialog.askopenfilename(title='请选择文件')
211-
self.firmware_file_path_stringvar.set(firmware_file_path)
211+
if firmware_file_path:
212+
self.firmware_file_path_stringvar.set(firmware_file_path)
212213

213214
def on_fw_file_path_write(self, *args, **kwargs):
214215
firmware_file_path = self.firmware_file_path_stringvar.get()

0 commit comments

Comments
 (0)