[Python-checkins] r70599 - python/trunk/Lib/test/test_support.py

benjamin.peterson python-checkins at python.org
Wed Mar 25 22:42:51 CET 2009


Author: benjamin.peterson
Date: Wed Mar 25 22:42:51 2009
New Revision: 70599

Log:
this can be slightly less ugly

Modified:
   python/trunk/Lib/test/test_support.py

Modified: python/trunk/Lib/test/test_support.py
==============================================================================
--- python/trunk/Lib/test/test_support.py	(original)
+++ python/trunk/Lib/test/test_support.py	Wed Mar 25 22:42:51 2009
@@ -123,7 +123,7 @@
     possibility of False being returned occurs when regrtest.py is executing."""
     # see if the caller's module is __main__ - if so, treat as if
     # the resource was set
-    if sys._getframe().f_back.f_globals.get("__name__") == "__main__":
+    if sys._getframe(1).f_globals.get("__name__") == "__main__":
         return
     if not is_resource_enabled(resource):
         if msg is None:


More information about the Python-checkins mailing list