about summary refs log tree commit diff stats
path: root/ranger/ext/curses_interrupt_handler.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/ext/curses_interrupt_handler.py')
-rw-r--r--ranger/ext/curses_interrupt_handler.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/ranger/ext/curses_interrupt_handler.py b/ranger/ext/curses_interrupt_handler.py
index 606cbd62..d220d99c 100644
--- a/ranger/ext/curses_interrupt_handler.py
+++ b/ranger/ext/curses_interrupt_handler.py
@@ -11,12 +11,12 @@ a Ctrl+C (ASCII value 3) to the curses getch stack.
 import curses
 import signal
 
-_do_catch_interrupt = True
+_do_catch_interrupt = True  # pylint: disable=invalid-name
 
 
 def catch_interrupt(boolean=True):
     """Should interrupts be caught and simulate a ^C press in curses?"""
-    global _do_catch_interrupt
+    global _do_catch_interrupt  # pylint: disable=global-statement,invalid-name
     old_value = _do_catch_interrupt
     _do_catch_interrupt = bool(boolean)
     return old_value
@@ -24,15 +24,14 @@ def catch_interrupt(boolean=True):
 # The handler which will be used in signal.signal()
 
 
-def _interrupt_handler(a1, a2):
-    global _do_catch_interrupt
+def _interrupt_handler(signum, frame):
     # if a keyboard-interrupt occurs...
     if _do_catch_interrupt:
         # push a Ctrl+C (ascii value 3) to the curses getch stack
         curses.ungetch(3)
     else:
         # use the default handler
-        signal.default_int_handler(a1, a2)
+        signal.default_int_handler(signum, frame)
 
 
 def install_interrupt_handler():