Skip to content

Commit 7cca3d8

Browse files
committed
Improve exception handling.
1 parent 13af114 commit 7cca3d8

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/idlelib/idle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#! /usr/bin/env python
1+
#!/usr/bin/python
22

33
try:
44
import idlelib.PyShell
55
idlelib.PyShell.main()
6-
except:
6+
except ImportError:
77
# IDLE is not installed, but maybe PyShell is on sys.path:
88
import PyShell
99
PyShell.main()

Lib/idlelib/idle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#! /usr/bin/env python
1+
#!/usr/bin/python
22

33
try:
44
import idlelib.PyShell
55
idlelib.PyShell.main()
6-
except:
6+
except ImportError:
77
# IDLE is not installed, but maybe PyShell is on sys.path:
88
import PyShell
99
PyShell.main()

Lib/idlelib/idle.pyw

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#! /usr/bin/env python
1+
#!/usr/bin/python
22

33
try:
44
import idlelib.PyShell
55
idlelib.PyShell.main()
6-
except:
6+
except ImportError:
77
# IDLE is not installed, but maybe PyShell is on sys.path:
88
import PyShell
99
PyShell.main()

0 commit comments

Comments
 (0)