Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles/i3.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-05-02 21:01:50 +1000
committerGitHub <noreply@github.com>2022-05-02 13:01:50 +0200
commitf00717ff6fd1c72d61b6928444fbf26a3f5e0e64 (patch)
tree0d37ec0b3f666d0316c7f97dce5c1cf3c81e832f /profiles/i3.py
parent48b1001734529c86d09c718d28e32cd6c23958bb (diff)
Fix #1106 (#1119)
* Fix #1106 * flake8 * flake8 Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'profiles/i3.py')
-rw-r--r--profiles/i3.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/profiles/i3.py b/profiles/i3.py
index 24956209..3283848e 100644
--- a/profiles/i3.py
+++ b/profiles/i3.py
@@ -27,20 +27,21 @@ def _prep_function(*args, **kwargs):
supported_configurations = ['i3-wm', 'i3-gaps']
- desktop = archinstall.Menu('Select your desired configuration', supported_configurations, skip=False).run()
-
- # Temporarily store the selected desktop profile
- # in a session-safe location, since this module will get reloaded
- # the next time it gets executed.
- archinstall.storage['_i3_configuration'] = desktop
-
- # i3 requires a functioning Xorg installation.
- profile = archinstall.Profile(None, 'xorg')
- with profile.load_instructions(namespace='xorg.py') as imported:
- if hasattr(imported, '_prep_function'):
- return imported._prep_function()
- else:
- print('Deprecated (??): xorg profile has no _prep_function() anymore')
+ desktop = archinstall.Menu('Select your desired configuration', supported_configurations).run()
+
+ if desktop:
+ # Temporarily store the selected desktop profile
+ # in a session-safe location, since this module will get reloaded
+ # the next time it gets executed.
+ archinstall.storage['_i3_configuration'] = desktop
+
+ # i3 requires a functioning Xorg installation.
+ profile = archinstall.Profile(None, 'xorg')
+ with profile.load_instructions(namespace='xorg.py') as imported:
+ if hasattr(imported, '_prep_function'):
+ return imported._prep_function()
+ else:
+ print('Deprecated (??): xorg profile has no _prep_function() anymore')
if __name__ == 'i3':