plugins/python/example_{io,conversation}: avoid printing signal number
They are platform dependant, so their test would fail on some platforms. While we could create separate plugin for the tests, I like the idea that the examples are ensured to be working. I believe this is a good compromise for being able to auto update the test cases.
This commit is contained in:

committed by
Todd C. Miller

parent
40f2189586
commit
f3b7f3c0d4
@@ -99,8 +99,7 @@ class SudoIOPlugin(sudo.Plugin):
|
||||
|
||||
def log_suspend(self, signo: int) -> int:
|
||||
try:
|
||||
signal_name = signal.Signals(signo).name
|
||||
signal_description = "{} ({})".format(signal_name, signo)
|
||||
signal_description = signal.Signals(signo).name
|
||||
except (AttributeError, ValueError):
|
||||
signal_description = "signal {}".format(signo)
|
||||
|
||||
|
Reference in New Issue
Block a user