prevent C-c / C-x from exiting console conf
I've left C-x as a way to get out in dry-run mode as that's useful for debugging.
This commit is contained in:
parent
7184f61937
commit
d6cf8e1bcf
|
@ -64,9 +64,6 @@ def parse_options(argv):
|
|||
return parser.parse_args(argv)
|
||||
|
||||
|
||||
def control_c_handler(signum, frame):
|
||||
sys.exit(1)
|
||||
|
||||
LOGDIR = "/var/log/console-conf/"
|
||||
|
||||
def main():
|
||||
|
@ -79,7 +76,7 @@ def main():
|
|||
logger.info("Starting console-conf v{}".format(VERSION))
|
||||
logger.info("Arguments passed: {}".format(sys.argv))
|
||||
|
||||
signal.signal(signal.SIGINT, control_c_handler)
|
||||
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||
|
||||
env_ok = environment_check(ENVIRONMENT)
|
||||
if env_ok is False and not opts.dry_run:
|
||||
|
|
|
@ -11,6 +11,9 @@ subiquity (0.0.13) UNRELEASED; urgency=medium
|
|||
* debian/console-conf-wrapper: trap various signals in our shell script,
|
||||
as they should be in console-conf itself.
|
||||
|
||||
[ Michael Hudson-Doyle ]
|
||||
* Prevent C-c and C-x from exiting console-conf.
|
||||
|
||||
-- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Tue, 30 Aug 2016 13:57:46 -0400
|
||||
|
||||
subiquity (0.0.12) yakkety; urgency=medium
|
||||
|
|
|
@ -68,6 +68,8 @@ class Application:
|
|||
|
||||
# Add quit signal
|
||||
signals.append(('quit', self.exit))
|
||||
if self.common['opts'].dry_run:
|
||||
signals.append(('control-x-quit', self.exit))
|
||||
signals.append(('refresh', self.redraw_screen))
|
||||
self.common['signal'].connect_signals(signals)
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@ class BaseView(WidgetWrap):
|
|||
self.signal.prev_signal()
|
||||
return None
|
||||
if key in ['ctrl x']:
|
||||
self.signal.register_signals('quit')
|
||||
self.signal.emit_signal('quit')
|
||||
return None
|
||||
self.signal.emit_signal('control-x-quit')
|
||||
|
||||
return super().keypress(size, key)
|
||||
|
|
Loading…
Reference in New Issue