File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1515
1616from __future__ import absolute_import
1717
18+ import io
1819import os
1920import sys
2021import logging
@@ -89,13 +90,14 @@ def find_caller(stack_info=False, stacklevel=1):
8990 """
9091 if six .PY2 :
9192 rv = '(unknown file)' , 0 , '(unknown function)'
92- else : # python 3, has extra tuple element at the end for stack information
93+ else :
94+ # python 3, has extra tuple element at the end for stack information
9395 rv = '(unknown file)' , 0 , '(unknown function)' , None
9496
9597 try :
9698 f = logging .currentframe ()
97- #On some versions of IronPython, currentframe() returns None if
98- #IronPython isn't run with -X:Frames.
99+ # On some versions of IronPython, currentframe() returns None if
100+ # IronPython isn't run with -X:Frames.
99101 if f is not None :
100102 f = f .f_back
101103 orig_f = f
@@ -114,7 +116,8 @@ def find_caller(stack_info=False, stacklevel=1):
114116
115117 if six .PY2 :
116118 rv = (filename , f .f_lineno , co .co_name )
117- else : # python 3, new stack_info processing and extra tuple return value
119+ else :
120+ # python 3, new stack_info processing and extra tuple return value
118121 sinfo = None
119122 if stack_info :
120123 sio = io .StringIO ()
You can’t perform that action at this time.
0 commit comments