forked from Mirror/pmbootstrap
Fix custom pmaports dir (pmbootstrap --args) (MR 2342)
The aports argument is a list of paths now, so iterate over each of them when checking if they exist. Fix for: INFO:root:ERROR: 'list' object has no attribute 'exists'
This commit is contained in:
parent
6915c6a17b
commit
91aee0b34c
1 changed files with 7 additions and 4 deletions
|
@ -54,10 +54,13 @@ def init(args: PmbArgs) -> PmbArgs:
|
||||||
# sys.exit(0)
|
# sys.exit(0)
|
||||||
config = pmb.config.load(args.config)
|
config = pmb.config.load(args.config)
|
||||||
|
|
||||||
if args.aports and not args.aports.exists():
|
if args.aports:
|
||||||
raise ValueError(
|
for pmaports_dir in args.aports:
|
||||||
"pmaports path (specified with --aports) does" f" not exist: {args.aports}"
|
if pmaports_dir.exists():
|
||||||
)
|
continue
|
||||||
|
raise ValueError(
|
||||||
|
f"pmaports path (specified with --aports) does not exist: {pmaports_dir}"
|
||||||
|
)
|
||||||
|
|
||||||
# Override config at runtime with command line arguments
|
# Override config at runtime with command line arguments
|
||||||
for key, _ in vars(config).items():
|
for key, _ in vars(config).items():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue