[Python-checkins] r74215 - python/branches/release26-maint/Lib/inspect.py
michael.foord
python-checkins at python.org
Sun Jul 26 23:11:47 CEST 2009
Author: michael.foord
Date: Sun Jul 26 23:11:42 2009
New Revision: 74215
Log:
Issue 6581. Michael Foord
Modified:
python/branches/release26-maint/Lib/inspect.py
Modified: python/branches/release26-maint/Lib/inspect.py
==============================================================================
--- python/branches/release26-maint/Lib/inspect.py (original)
+++ python/branches/release26-maint/Lib/inspect.py Sun Jul 26 23:11:42 2009
@@ -947,7 +947,10 @@
tb = tb.tb_next
return framelist
-currentframe = sys._getframe
+if hasattr(sys, '_getframe'):
+ currentframe = sys._getframe
+else:
+ currentframe = lambda _=None: None
def stack(context=1):
"""Return a list of records for the stack above the caller's frame."""
More information about the Python-checkins
mailing list