Commit 8cf4b34b authored by sblondon's avatar sblondon Committed by Serhiy Storchaka

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

parent ddb6215a
...@@ -124,8 +124,9 @@ function calls leading up to the error, in the order they occurred.</p>''' ...@@ -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. ...@@ -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 = {}
......
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