##// END OF EJS Templates
oinspect.find_file: Additional safety if file cannot be found....
Bradley M. Froehle -
Show More
@@ -249,7 +249,8 b' def find_file(obj):'
249 249 # get source if obj was decorated with @decorator
250 250 if hasattr(obj, '__wrapped__'):
251 251 obj = obj.__wrapped__
252
252
253 fname = None
253 254 try:
254 255 fname = inspect.getabsfile(obj)
255 256 except TypeError:
@@ -260,9 +261,9 b' def find_file(obj):'
260 261 fname = inspect.getabsfile(obj.__class__)
261 262 except TypeError:
262 263 # Can happen for builtins
263 fname = None
264 pass
264 265 except:
265 fname = None
266 pass
266 267 return fname
267 268
268 269
General Comments 0
You need to be logged in to leave comments. Login now