Kaydet (Commit) c384fc23 authored tarafından Vinay Sajip's avatar Vinay Sajip

Changed _srcfile determination to support py2exe.

üst c1c956b2
...@@ -52,7 +52,9 @@ __date__ = "27 March 2005" ...@@ -52,7 +52,9 @@ __date__ = "27 March 2005"
# _srcfile is used when walking the stack to check when we've got the first # _srcfile is used when walking the stack to check when we've got the first
# caller stack frame. # caller stack frame.
# #
if string.lower(__file__[-4:]) in ['.pyc', '.pyo']: if hasattr(sys, 'frozen'): #support for py2exe
_srcfile = "logging%s__init__%s" % (os.sep, __file__[-4:])
elif string.lower(__file__[-4:]) in ['.pyc', '.pyo']:
_srcfile = __file__[:-4] + '.py' _srcfile = __file__[:-4] + '.py'
else: else:
_srcfile = __file__ _srcfile = __file__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment