classification
Title: execfile() not show filename when IOErro
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nowonder Nosy List: gvanrossum, inyeol, nowonder
Priority: normal Keywords:

Created on 2002-08-23 10:16 by inyeol, last changed 2002-09-03 19:40 by gvanrossum. This issue is now closed.

Messages (3)
msg12115 - (view) Author: Inyeol Lee (inyeol) Date: 2002-08-23 10:16
Python 2.2.1 (#1, Apr 10 2002, 18:25:16) 
[GCC 2.95.3 20010315 (release)] on sunos5
>>> try: execfile('non_existent_file')
... except IOError, msg: msg.__dict__

{'errno': 2, 'args': (2, 'No such file or directory'),
'strerror': 'No such file or directory', 'filename':
None}

There should be a filename, not None.

-Inyeol Lee 
msg12116 - (view) Author: Peter Schneider-Kamp (nowonder) * Date: 2002-08-27 16:59
Logged In: YES 
user_id=14463

execfile incorrectly called PyErr_SetFromErrno instead of
PyErr_SetFromErrnoWithFilename.

Resolution is obvious and already committed to cvs.
msg12117 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-03 19:40
Logged In: YES 
user_id=6380

Credit where credit is due. :-)
History
Date User Action Args
2002-08-23 10:16:18inyeolcreate