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 15
15
16
16
from __future__ import absolute_import
17
17
18
+ import io
18
19
import os
19
20
import sys
20
21
import logging
@@ -89,13 +90,14 @@ def find_caller(stack_info=False, stacklevel=1):
89
90
"""
90
91
if six .PY2 :
91
92
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
93
95
rv = '(unknown file)' , 0 , '(unknown function)' , None
94
96
95
97
try :
96
98
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.
99
101
if f is not None :
100
102
f = f .f_back
101
103
orig_f = f
@@ -114,7 +116,8 @@ def find_caller(stack_info=False, stacklevel=1):
114
116
115
117
if six .PY2 :
116
118
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
118
121
sinfo = None
119
122
if stack_info :
120
123
sio = io .StringIO ()
You can’t perform that action at this time.
0 commit comments