summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/filedialog.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tkinter/filedialog.py')
-rw-r--r--Lib/tkinter/filedialog.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/tkinter/filedialog.py b/Lib/tkinter/filedialog.py
index 600d0bd..e2eff98 100644
--- a/Lib/tkinter/filedialog.py
+++ b/Lib/tkinter/filedialog.py
@@ -461,7 +461,6 @@ def test():
# Start off with UTF-8
enc = "utf-8"
- import sys
# See whether CODESET is defined
try:
@@ -477,9 +476,9 @@ def test():
try:
fp=open(openfilename,"r")
fp.close()
- except:
+ except BaseException as exc:
print("Could not open File: ")
- print(sys.exc_info()[1])
+ print(exc)
print("open", openfilename.encode(enc))