Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/interactions/general_conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/interactions/general_conf.py')
-rw-r--r--archinstall/lib/interactions/general_conf.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/archinstall/lib/interactions/general_conf.py b/archinstall/lib/interactions/general_conf.py
index a23426d0..b12a6fb8 100644
--- a/archinstall/lib/interactions/general_conf.py
+++ b/archinstall/lib/interactions/general_conf.py
@@ -28,14 +28,15 @@ def ask_ntp(preset: bool = True) -> bool:
def ask_hostname(preset: str = '') -> str:
- while True:
- hostname = TextInput(
- str(_('Desired hostname for the installation: ')),
- preset
- ).run().strip()
+ hostname = TextInput(
+ str(_('Desired hostname for the installation: ')),
+ preset
+ ).run().strip()
+
+ if not hostname:
+ return preset
- if hostname:
- return hostname
+ return hostname
def ask_for_a_timezone(preset: Optional[str] = None) -> Optional[str]: