forked from Mirror/pmbootstrap
config: init: fix crash in mirrors prompt (MR 2367)
This was missed in fc010bc7c8
Before this fix:
```
...
[18:34:35] Enable background timer to prevent repeated sudo authorization? (y/n) [n]: y
(020272) [18:34:44] ERROR: 'Config' object has no attribute 'mirrors_postmarketos'
(020272) [18:34:44] See also: <https://postmarketos.org/troubleshooting>
(020272) [18:34:44] Traceback (most recent call last):
File "/home/arnavion/src/pmbootstrap/pmb/__init__.py", line 72, in main
return config_init.frontend(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/arnavion/src/pmbootstrap/pmb/config/init.py", line 729, in frontend
ask_for_additional_options(config)
File "/home/arnavion/src/pmbootstrap/pmb/config/init.py", line 542, in ask_for_additional_options
logging.info("Selected mirror:" f" {','.join(context.config.mirrors_postmarketos)}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/arnavion/src/pmbootstrap/pmb/core/config.py", line 130, in __getattribute__
return super().__getattribute__(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Config' object has no attribute 'mirrors_postmarketos'
```
This commit is contained in:
parent
1af44fb159
commit
b98c5e2cab
1 changed files with 1 additions and 1 deletions
|
@ -539,7 +539,7 @@ def ask_for_additional_options(config):
|
|||
|
||||
# Mirrors
|
||||
# prompt for mirror change
|
||||
logging.info("Selected mirror:" f" {','.join(context.config.mirrors_postmarketos)}")
|
||||
logging.info("Selected mirror:" f" {context.config.mirrors['pmaports']}")
|
||||
if pmb.helpers.cli.confirm("Change mirror?", default=False):
|
||||
mirror = ask_for_mirror()
|
||||
config.mirrors["pmaports"] = mirror
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue