clean_output: prune lines that consisting of '^' characters and whitespace.

Starting with Python 3.11, backtraces may contain a line with '^'
characters to bring attention to the important part of the line.
Also replace "REJECT" with "0" in backtrace output for Python 3.11.
This commit is contained in:
Todd C. Miller
2022-04-11 19:05:06 -06:00
parent a1e20ddd95
commit 930271847a
2 changed files with 43 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
SudoGroupPlugin.__init__ was called with arguments: () [('args', ('ModulePath=SRC_DIR/example_group_plugin.py', 'ClassName=SudoGroupPlugin')), ('version', '1.0')]
SudoGroupPlugin.__init__ returned result: <example_group_plugin.SudoGroupPlugin object>
SudoGroupPlugin.query was called with arguments: ('user', 'group', ('pw_name', 'pw_passwd', 1001, 101, 'pw_gecos', 'pw_dir', 'pw_shell'))
SudoGroupPlugin.query returned result: REJECT
SudoGroupPlugin.query returned result: 0