diff options
author | Martin Sivak <msivak@redhat.com> | 2013-03-13 13:31:35 +0100 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2013-03-13 13:31:35 +0100 |
commit | 3372a49b0266589a7f31976b892592c5ce2f3137 (patch) | |
tree | 28d59500871199d395eb0d368cfa7cd636b45340 | |
parent | e2927e730fe7053b819ff09672de3d6043870862 (diff) | |
download | firstboot2-3372a49b0266589a7f31976b892592c5ce2f3137.tar.gz firstboot2-3372a49b0266589a7f31976b892592c5ce2f3137.tar.xz firstboot2-3372a49b0266589a7f31976b892592c5ce2f3137.zip |
Do not write configuration if exit was selected
-rw-r--r-- | initial_setup/__main__.py | 8 |
1 files changed, 7 insertions, 1 deletions
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 |