From 96de7d852d0e9437bd3bf3edbd443835d0532ae4 Mon Sep 17 00:00:00 2001 From: dyxLike Date: Fri, 19 Jul 2019 22:29:51 +0800 Subject: [PATCH] fix open file bug --- guistarter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guistarter.py b/guistarter.py index 88d2657..2e4ef8e 100644 --- a/guistarter.py +++ b/guistarter.py @@ -59,6 +59,8 @@ def __init__(self, master=None): def doupload(self, event=None): local_file_path = filedialog.askopenfilename(title='上传', filetypes=[('image', '*.jpg;*.jpeg;*.png;*.gif;*.ico;*.bmp;*.webp'), ('All Files', '*')]) + if local_file_path=="": + return self.copytext.set("making...") checkdata = self.Combo1.get() checkindex = self.Combo1List.index(checkdata)