From 3372a49b0266589a7f31976b892592c5ce2f3137 Mon Sep 17 00:00:00 2001 From: Martin Sivak Date: Wed, 13 Mar 2013 13:31:35 +0100 Subject: Do not write configuration if exit was selected --- initial_setup/__main__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'initial_setup') diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py index 2e6fde9..ef9fdd1 100644 --- a/initial_setup/__main__.py +++ b/initial_setup/__main__.py @@ -1,5 +1,6 @@ #!/bin/python import os +import sys if "DISPLAY" in os.environ and os.environ["DISPLAY"]: mode="gui" @@ -61,7 +62,12 @@ else: ui.setup(data) # Start the application -ui.run() +ret = ui.run() + +# TUI returns False if the app was ended prematurely +# all other cases return True or None +if ret == False: + sys.exit(0) # Print the kickstart file print data -- cgit