Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/swiss.py
diff options
context:
space:
mode:
authorDaniel <blackrabbit256@gmail.com>2022-03-01 03:03:37 +1100
committerGitHub <noreply@github.com>2022-02-28 17:03:37 +0100
commit35a19a616aee602a849097411cc0254a27c3f9b7 (patch)
tree5b1db96f151fae55f7b76e06066fc747daf6b070 /examples/swiss.py
parent04e3880d8f41a87889690609e20ab1220700c163 (diff)
Menu option save config (#1009)
* Add new save config menu option * Update * Fixed issue with merging * Fixed merge issue (I think) Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com> Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Diffstat (limited to 'examples/swiss.py')
-rw-r--r--examples/swiss.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/swiss.py b/examples/swiss.py
index 4eb51a05..cf864ed5 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -19,6 +19,7 @@ import time
import pathlib
import archinstall
+from archinstall import ConfigurationOutput
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -248,10 +249,10 @@ class MyMenu(archinstall.GlobalMenu):
self.enable(entry)
else:
self.option(entry).set_enabled(False)
- self._update_install()
+ self._update_install_text()
def post_callback(self,option,value=None):
- self._update_install(self._execution_mode)
+ self._update_install_text(self._execution_mode)
def _missing_configs(self,mode='full'):
def check(s):
@@ -271,7 +272,7 @@ class MyMenu(archinstall.GlobalMenu):
return f'Instalation ({missing} config(s) missing)'
return 'Install'
- def _update_install(self,mode='full'):
+ def _update_install_text(self, mode='full'):
text = self._install_text(mode)
self.option('install').update_description(text)
@@ -492,7 +493,11 @@ mode = archinstall.arguments.get('mode', 'full').lower()
if not archinstall.arguments.get('silent'):
ask_user_questions(mode)
-archinstall.output_configs(archinstall.arguments,show=False if archinstall.arguments.get('silent') else True)
+config_output = ConfigurationOutput(archinstall.arguments)
+if not archinstall.arguments.get('silent'):
+ config_output.show()
+config_output.save()
+
if archinstall.arguments.get('dry_run'):
exit(0)
if not archinstall.arguments.get('silent'):