From 06f95d75d3a2709099df8de5cc0fa4a48798b0cb Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Sun, 14 Jul 2024 22:12:44 +0100 Subject: [PATCH] properly pass the signal name --- qa/sbin/bgp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/sbin/bgp b/qa/sbin/bgp index e9eed7d50..3f85d4254 100755 --- a/qa/sbin/bgp +++ b/qa/sbin/bgp @@ -97,13 +97,13 @@ def cdr_to_length(cidr): return 0 -def kill(skip, signal_name='SIGUSR1'): +def kill(signal_name='SIGUSR1'): names = [name for name in dir(signal) if name.startswith('SIG')] signals = dict([(name, getattr(signal, name)) for name in names]) - number = signals.get(signal_name, '') + number = signals.get(signal_name.upper(), '') if not number: - raise f'invalid signal name: {signal_name}' + raise ValueError(f'invalid signal name: {signal_name}') # --view is argv[1] conf_name = sys.argv[2].split('/')[-1].split('.')[0]