Skip to content

Commit 58cd8e2

Browse files
committed
Remove trailing whitespace from test output.
--HG-- branch : 1.9
1 parent 8aeb76f commit 58cd8e2

11 files changed

Lines changed: 25 additions & 25 deletions

plugins/python/example_audit_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, plugin_options, user_info, **kwargs):
1616
user_info_dict = sudo.options_as_dict(user_info)
1717
user = user_info_dict.get("user", "???")
1818
uid = user_info_dict.get("uid", "???")
19-
self._log("-- Started by user {} ({}) -- ".format(user, uid))
19+
self._log("-- Started by user {} ({}) --".format(user, uid))
2020

2121
def __del__(self):
2222
self._log("-- Finished --")

plugins/python/pyhelpers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ _py_debug_python_function(const char *class_name, const char *function_name, con
363363
Py_DECREF(py_kwargs_sorted);
364364
}
365365

366-
sudo_debug_printf(SUDO_DEBUG_DIAG, "%s.%s %s: %s %s\n", class_name,
366+
sudo_debug_printf(SUDO_DEBUG_DIAG, "%s.%s %s: %s%s%s\n", class_name,
367367
function_name, message, args_str ? args_str : "()",
368-
kwargs_str ? kwargs_str : "");
368+
kwargs_str ? " " : "", kwargs_str ? kwargs_str : "");
369369
free(args_str);
370370
free(kwargs_str);
371371
}

plugins/python/regress/testdata/check_example_audit_plugin_receives_accept.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(AUDIT) -- Started by user testuser1 (123) --
1+
(AUDIT) -- Started by user testuser1 (123) --
22
(AUDIT) Requested command: id --help
33
(AUDIT) Accepted command: /sbin/id --help
44
(AUDIT) By the plugin: accepter plugin name (type=POLICY)

plugins/python/regress/testdata/check_example_audit_plugin_receives_error.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(AUDIT) -- Started by user ??? (???) --
1+
(AUDIT) -- Started by user ??? (???) --
22
(AUDIT) Requested command: id
33
(AUDIT) Plugin errorer plugin name (type=AUDIT) got an error: Some error has happened
44
(AUDIT) Sudo has run into an error: 222

plugins/python/regress/testdata/check_example_audit_plugin_receives_reject.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(AUDIT) -- Started by user root (0) --
1+
(AUDIT) -- Started by user root (0) --
22
(AUDIT) Requested command: passwd
33
(AUDIT) Rejected by plugin rejecter plugin name (type=IO): Rejected just because!
44
(AUDIT) The command was not executed

plugins/python/regress/testdata/check_example_audit_plugin_version_display.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(AUDIT) -- Started by user root (0) --
1+
(AUDIT) -- Started by user root (0) --
22
Python Example Audit Plugin
33
Python audit plugin (API 1.0): SudoAuditPlugin (loaded from 'SRC_DIR/example_audit_plugin.py')
44
Python Example Audit Plugin (version=1.0)

plugins/python/regress/testdata/check_example_audit_plugin_workflow_multiple.stdout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
(AUDIT1) -- Started by user default (1000) --
1+
(AUDIT1) -- Started by user default (1000) --
22
(AUDIT1) Requested command: id --help
3-
(AUDIT2) -- Started by user default (1000) --
3+
(AUDIT2) -- Started by user default (1000) --
44
(AUDIT2) Requested command: id --help
55
(AUDIT1) Accepted command: /sbin/id --help
66
(AUDIT1) By the plugin: accepter plugin name (type=POLICY)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
2-
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
1+
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
2+
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
33
LogHandler.emit was called
44
LogHandler.emit was called
5-
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
6-
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
5+
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
6+
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
__init__ @ SRC_DIR/example_debugging.py:58 calls C function:
2-
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
2+
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
33
__init__ @ SRC_DIR/example_debugging.py:63 calls C function:
4-
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
4+
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
55
handle @ logging/__init__.py calls C function:
66
LogHandler.emit was called
77
handle @ logging/__init__.py calls C function:
88
LogHandler.emit was called
99
__init__ @ SRC_DIR/example_debugging.py:85 calls C function:
10-
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
11-
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
10+
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
11+
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
SudoGroupPlugin.__init__ was called with arguments: () [('args', ('ModulePath=SRC_DIR/example_group_plugin.py', 'ClassName=SudoGroupPlugin')), ('version', '1.0')]
22
SudoGroupPlugin.__init__ returned result: <example_group_plugin.SudoGroupPlugin object>
3-
SudoGroupPlugin.query was called with arguments: ('user', 'group', ('pw_name', 'pw_passwd', 1001, 101, 'pw_gecos', 'pw_dir', 'pw_shell'))
4-
SudoGroupPlugin.query returned result: 0
3+
SudoGroupPlugin.query was called with arguments: ('user', 'group', ('pw_name', 'pw_passwd', 1001, 101, 'pw_gecos', 'pw_dir', 'pw_shell'))
4+
SudoGroupPlugin.query returned result: 0

0 commit comments

Comments
 (0)