Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80f2262

Browse files
committed
Issue #21709: Remove references to __file__ when part of a frozen application.
1 parent 76d3f14 commit 80f2262

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/logging/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
# _srcfile is used when walking the stack to check when we've got the first
5656
# caller stack frame.
5757
#
58-
if hasattr(sys, 'frozen'): #support for py2exe
59-
_srcfile = "logging%s__init__%s" % (os.sep, __file__[-4:])
58+
if hasattr(sys, 'frozen'):
59+
_srcfile = os.path.join('logging', '__init__.py')
6060
else:
6161
_srcfile = __file__
6262
_srcfile = os.path.normcase(_srcfile)

0 commit comments

Comments
 (0)