Rename a parameter instead of using an underscore to avoid a name conflict.
David Blume

David Blume commited on 2019-08-27 10:02:29
Showing 4 changed files, with 8 additions and 8 deletions.

... ...
@@ -15,9 +15,9 @@ import signal
15 15
 
16 16
 printer_lock = threading.Lock()
17 17
 
18
-def log_exit(_signal, frame):
18
+def log_exit(sig, frame):
19 19
     log(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} '
20
-        f' PID={os.getpid()} signal={signal.Signals(_signal).name} Exiting.')
20
+        f'PID={os.getpid()} signal={signal.Signals(sig).name} Exiting.')
21 21
     sys.exit(0)
22 22
 
23 23
 
... ...
@@ -15,9 +15,9 @@ import queue
15 15
 import signal
16 16
 
17 17
 
18
-def log_exit(_signal, frame):
18
+def log_exit(sig, frame):
19 19
     _print_queue.put([f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} '
20
-                      f' PID={os.getpid()} signal={signal.Signals(_signal).name} Exiting.'])
20
+                      f'PID={os.getpid()} signal={signal.Signals(sig).name} Exiting.'])
21 21
     _print_queue.join()
22 22
     sys.exit(0)
23 23
 
... ...
@@ -17,9 +17,9 @@ import signal
17 17
 pinger_lock = threading.Lock()
18 18
 
19 19
 
20
-def log_exit(signal_, frame):
20
+def log_exit(sig, frame):
21 21
     _print_queue.put([f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} '
22
-                      f' PID={os.getpid()} signal={signal.Signals(signal_).name} Exiting.'])
22
+                      f'PID={os.getpid()} signal={signal.Signals(sig).name} Exiting.'])
23 23
     _print_queue.join()
24 24
     sys.exit(0)
25 25
 
... ...
@@ -17,9 +17,9 @@ import signal
17 17
 pinger_lock = threading.Lock()
18 18
 
19 19
 
20
-def log_exit(_signal, frame):
20
+def log_exit(sig, frame):
21 21
     _print_queue.put([f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} '
22
-                      f' PID={os.getpid()} signal={signal.Signals(_signal).name} Exiting.'])
22
+                      f'PID={os.getpid()} signal={signal.Signals(sig).name} Exiting.'])
23 23
     _print_queue.join()
24 24
     sys.exit(0)
25 25
 
26 26