[Python-bugs-list] [ python-Bugs-599163 ] execfile() not show filename when IOErro

noreply@sourceforge.net noreply@sourceforge.net
Tue, 27 Aug 2002 09:59:28 -0700


Bugs item #599163, was opened at 2002-08-23 10:16
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=599163&group_id=5470

Category: Python Library
Group: Python 2.2.1
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Inyeol Lee (inyeol)
Assigned to: Nobody/Anonymous (nobody)
Summary: execfile() not show filename when IOErro

Initial Comment:
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 

----------------------------------------------------------------------

>Comment By: Peter Schneider-Kamp (nowonder)
Date: 2002-08-27 16:59

Message:
Logged In: YES 
user_id=14463

execfile incorrectly called PyErr_SetFromErrno instead of
PyErr_SetFromErrnoWithFilename.

Resolution is obvious and already committed to cvs.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=599163&group_id=5470