[issue1514420] Traceback display code can attempt to open a file named "<stdin>"

Antoine Pitrou report at bugs.python.org
Thu Apr 17 23:05:32 CEST 2014


Antoine Pitrou added the comment:

The problem is not in the import, but when displaying the traceback of the exception. In other words, if you catch the exception, no attempt to open "<stdin>" happens:

$ strace -e open ./python
[...]
Python 3.5.0a0 (default:3417a95df7e2, Apr 16 2014, 17:57:12) 
[GCC 4.8.1] on linux
[...]
>>> 
>>> try: import dismal
... except ImportError: pass
... 
>>>

----------
nosy: +pitrou
priority: normal -> low
stage: test needed -> 
title: Missing module code does spurious file search -> Traceback display code can attempt to open a file named "<stdin>"
versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1514420>
_______________________________________


More information about the Python-bugs-list mailing list