[Zope3-checkins] SVN: Zope3/trunk/src/RestrictedPython/tests/testRestrictions.py Fix obscure bug that caused the source not to be fonud when installed using

Fred L. Drake, Jr. fdrake at gmail.com
Thu Sep 2 22:16:28 EDT 2004


Log message for revision 27435:
  Fix obscure bug that caused the source not to be fonud when installed using
  via distutils to a relative path.
  
  (merged from ZopeX3-3.0 branch revision 27434)
  


Changed:
  U   Zope3/trunk/src/RestrictedPython/tests/testRestrictions.py


-=-
Modified: Zope3/trunk/src/RestrictedPython/tests/testRestrictions.py
===================================================================
--- Zope3/trunk/src/RestrictedPython/tests/testRestrictions.py	2004-09-03 02:13:22 UTC (rev 27434)
+++ Zope3/trunk/src/RestrictedPython/tests/testRestrictions.py	2004-09-03 02:16:28 UTC (rev 27435)
@@ -52,8 +52,7 @@
 
 def get_source(func):
     """Less silly interface to find_source""" # Sheesh
-    code = func.func_code
-    return find_source(code.co_filename, code)[1]
+    return find_source(func.func_globals['__file__'], func.func_code)[1]
 
 def create_rmodule():
     global rmodule



More information about the Zope3-Checkins mailing list