SF.net SVN: jython:[7247] trunk/jython/Lib/warnings.py

[email protected] Sat, 19 Mar 2011 20:39:48 +0000
Newsgroups gmane.comp.lang.jython.cvs
Message-ID <[email protected]>
Revision: 7247
          http://jython.svn.sourceforge.net/jython/?rev=7247&view=rev
Author:   pjenvey
Date:     2011-03-19 20:39:47 +0000 (Sat, 19 Mar 2011)

Log Message:
-----------
reapply r5601 to warnings.py, correctly fix filename from the compiled filename

Modified Paths:
--------------
    trunk/jython/Lib/warnings.py

Modified: trunk/jython/Lib/warnings.py
===================================================================
--- trunk/jython/Lib/warnings.py	2011-03-19 20:03:20 UTC (rev 7246)
+++ trunk/jython/Lib/warnings.py	2011-03-19 20:39:47 UTC (rev 7247)
@@ -187,6 +187,8 @@
         fnl = filename.lower()
         if fnl.endswith((".pyc", ".pyo")):
             filename = filename[:-1]
+        elif fnl.endswith("$py.class"):
+            filename = filename[:-9] + '.py'
     else:
         if module == "__main__":
             try:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d