From: Benjamin Peterson Date: Wed, 25 Mar 2009 21:42:51 +0000 (+0000) Subject: this can be slightly less ugly X-Git-Tag: v2.7a1~1795 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f6f7436aa16df56b60e584f5396ffe7c608a2e1;p=python this can be slightly less ugly --- diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index df3dce6756..73fa8bacc7 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -123,7 +123,7 @@ def requires(resource, msg=None): 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: