bpo-33311: Do not display parameters displayed in parentheses for module call. (GH-6677)
This commit is contained in:
parent
ddb6215a55
commit
8cf4b34b36
10
Lib/cgitb.py
10
Lib/cgitb.py
|
@ -124,8 +124,9 @@ function calls leading up to the error, in the order they occurred.</p>'''
|
||||||
args, varargs, varkw, locals = inspect.getargvalues(frame)
|
args, varargs, varkw, locals = inspect.getargvalues(frame)
|
||||||
call = ''
|
call = ''
|
||||||
if func != '?':
|
if func != '?':
|
||||||
call = 'in ' + strong(pydoc.html.escape(func)) + \
|
call = 'in ' + strong(pydoc.html.escape(func))
|
||||||
inspect.formatargvalues(args, varargs, varkw, locals,
|
if func != "<module>":
|
||||||
|
call += inspect.formatargvalues(args, varargs, varkw, locals,
|
||||||
formatvalue=lambda value: '=' + pydoc.html.repr(value))
|
formatvalue=lambda value: '=' + pydoc.html.repr(value))
|
||||||
|
|
||||||
highlight = {}
|
highlight = {}
|
||||||
|
@ -207,8 +208,9 @@ function calls leading up to the error, in the order they occurred.
|
||||||
args, varargs, varkw, locals = inspect.getargvalues(frame)
|
args, varargs, varkw, locals = inspect.getargvalues(frame)
|
||||||
call = ''
|
call = ''
|
||||||
if func != '?':
|
if func != '?':
|
||||||
call = 'in ' + func + \
|
call = 'in ' + func
|
||||||
inspect.formatargvalues(args, varargs, varkw, locals,
|
if func != "<module>":
|
||||||
|
call += inspect.formatargvalues(args, varargs, varkw, locals,
|
||||||
formatvalue=lambda value: '=' + pydoc.text.repr(value))
|
formatvalue=lambda value: '=' + pydoc.text.repr(value))
|
||||||
|
|
||||||
highlight = {}
|
highlight = {}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Text and html output generated by cgitb does not display parentheses if the
|
||||||
|
current call is done directly in the module. Patch by Stéphane Blondon.
|
Loading…
Reference in New Issue