forked from Mirror/pmbootstrap
config: rename load.py to file.py (MR 2252)
It's weird to have a function with the same name as the module, rename it to avoid confusion. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
59ad8fd507
commit
f643673f48
3 changed files with 3 additions and 2 deletions
|
@ -12,7 +12,7 @@ from pmb.types import PmbArgs
|
|||
import pmb.helpers.apk
|
||||
import pmb.helpers.run
|
||||
import pmb.config
|
||||
import pmb.config.load
|
||||
import pmb.config.file
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.http
|
||||
import pmb.parse.version
|
||||
|
|
|
@ -11,7 +11,7 @@ from typing import Dict, List, Sequence
|
|||
#
|
||||
# FIXME (#2324): this sucks, we should re-organise this and not rely on "lifting"
|
||||
# this functions this way
|
||||
from pmb.config.load import load, save, serialize
|
||||
from pmb.config.file import load, save, serialize
|
||||
from pmb.config.sudo import which_sudo
|
||||
from pmb.config.other import is_systemd_selected
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ def load(path: Path) -> Config:
|
|||
|
||||
# One time migration "mirror_alpine" -> mirrors.alpine
|
||||
if "mirror_alpine" in cfg["pmbootstrap"] or "mirrors_postmarketos" in cfg["pmbootstrap"]:
|
||||
logging.info("Migrating config file to 3.0 format.")
|
||||
save(path, config)
|
||||
|
||||
return config
|
Loading…
Add table
Add a link
Reference in a new issue