Patches item #642612, was opened at 2002-11-22 16:38
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=304866&aid=642612&group_id=4866

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Stuart Donaldson (stuartd)
Assigned to: Nobody/Anonymous (nobody)
Summary: FancyTraceback fails if source missing

Initial Comment:
The Fancy Traceback display can fail to work if the
source files of all files in the traceback do not exist.

This can be the case if the .py files have since been
removed, or if the .py files are not in the same path
as the .pyc are imported.

In my scenario, python is installed from an rpm, the
rpm pre-compiles the .py files in the library into .pyc
files, however it does all of this in a temporary
directory which no longer exists in my installed
system.  The .pyc files claim their source file is
actually in that temporary directory.  So if I look at
the module ihooks, I see its source file does not
exist, even though it is in the same directory as
ihooks.pyc.

The problem appears to be that MiscUtils/inspect.py
getsourcefile() tries to find the file on the sys.path.
 However if the filename does not exist on that path,
it does not return anything, which results in cgitb.py
failing when it tries to interpret None as a string.

This patch simply adds a 'return filename' at the end
of inspect.py:getsourcefile() so it will not return None.


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=304866&aid=642612&group_id=4866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to