Kaydet (Commit) 8cf4b34b authored tarafından sblondon's avatar sblondon Kaydeden (comit) Serhiy Storchaka

bpo-33311: Do not display parameters displayed in parentheses for module call. (GH-6677)

üst ddb6215a
......@@ -124,8 +124,9 @@ function calls leading up to the error, in the order they occurred.</p>'''
args, varargs, varkw, locals = inspect.getargvalues(frame)
call = ''
if func != '?':
call = 'in ' + strong(pydoc.html.escape(func)) + \
inspect.formatargvalues(args, varargs, varkw, locals,
call = 'in ' + strong(pydoc.html.escape(func))
if func != "<module>":
call += inspect.formatargvalues(args, varargs, varkw, locals,
formatvalue=lambda value: '=' + pydoc.html.repr(value))
highlight = {}
......@@ -207,8 +208,9 @@ function calls leading up to the error, in the order they occurred.
args, varargs, varkw, locals = inspect.getargvalues(frame)
call = ''
if func != '?':
call = 'in ' + func + \
inspect.formatargvalues(args, varargs, varkw, locals,
call = 'in ' + func
if func != "<module>":
call += inspect.formatargvalues(args, varargs, varkw, locals,
formatvalue=lambda value: '=' + pydoc.text.repr(value))
highlight = {}
......
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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment