[Python-checkins] cpython (3.4): Issue #21709: Remove references to __file__ when part of a frozen application.
vinay.sajip
python-checkins at python.org
Wed Jun 11 09:04:29 CEST 2014
http://hg.python.org/cpython/rev/11a920a26f13
changeset: 91125:11a920a26f13
branch: 3.4
parent: 91123:a98fd4eeed40
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Wed Jun 11 08:01:32 2014 +0100
summary:
Issue #21709: Remove references to __file__ when part of a frozen application.
files:
Lib/logging/__init__.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -55,8 +55,8 @@
# _srcfile is used when walking the stack to check when we've got the first
# caller stack frame.
#
-if hasattr(sys, 'frozen'): #support for py2exe
- _srcfile = "logging%s__init__%s" % (os.sep, __file__[-4:])
+if hasattr(sys, 'frozen'):
+ _srcfile = os.path.join('logging', '__init__.py')
else:
_srcfile = __file__
_srcfile = os.path.normcase(_srcfile)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list