Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c626658

Browse files
committed
Let Python inform the user what went wrong with the import.
Modified Files: idle idle.py idle.pyw
1 parent 415da6e commit c626658

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/idlelib/idle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ except ImportError:
77
try:
88
import PyShell
99
except ImportError:
10-
print "Can't locate PyShell.py"
10+
raise
1111
else:
1212
import os
1313
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))

Lib/idlelib/idle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
try:
88
import PyShell
99
except ImportError:
10-
print "Can't locate PyShell.py"
10+
raise
1111
else:
1212
import os
1313
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))

Lib/idlelib/idle.pyw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ except ImportError:
55
try:
66
import PyShell
77
except ImportError:
8-
print "Can't locate PyShell.py"
8+
raise
99
else:
1010
import os
1111
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))

0 commit comments

Comments
 (0)