##// END OF EJS Templates
debug: add example of calling context
super-admin -
r4870:35250e06 default
parent child Browse files
Show More
@@ -319,6 +319,21 b' def find_calling_context(ignore_modules='
319 this function and is part of core module ( ie. rhodecode.* )
319 this function and is part of core module ( ie. rhodecode.* )
320
320
321 :param ignore_modules: list of modules to ignore eg. ['rhodecode.lib']
321 :param ignore_modules: list of modules to ignore eg. ['rhodecode.lib']
322
323 usage::
324 from rhodecode.lib.utils2 import find_calling_context
325
326 calling_context = find_calling_context(ignore_modules=[
327 'rhodecode.lib.caching_query',
328 'rhodecode.model.settings',
329 ])
330
331 if calling_context:
332 cc_str = 'call context %s:%s' % (
333 calling_context.f_code.co_filename,
334 calling_context.f_lineno,
335 )
336 print(cc_str)
322 """
337 """
323
338
324 ignore_modules = ignore_modules or []
339 ignore_modules = ignore_modules or []
General Comments 0
You need to be logged in to leave comments. Login now