parent
5044df88ab
commit
645a7dc14c
1 changed files with 4 additions and 4 deletions
|
@ -389,9 +389,8 @@ def _unknown_variants_in_dependencies(pkgs, error_cls):
|
||||||
dependency_variants = dependency_edge.spec.variants
|
dependency_variants = dependency_edge.spec.variants
|
||||||
for name, value in dependency_variants.items():
|
for name, value in dependency_variants.items():
|
||||||
try:
|
try:
|
||||||
dependency_pkg.variants[name].validate_or_raise(
|
v, _ = dependency_pkg.variants[name]
|
||||||
value, pkg=dependency_pkg
|
v.validate_or_raise(value, pkg=dependency_pkg)
|
||||||
)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
summary = (pkg_name + ": wrong variant used for a "
|
summary = (pkg_name + ": wrong variant used for a "
|
||||||
"dependency in a 'depends_on' directive")
|
"dependency in a 'depends_on' directive")
|
||||||
|
@ -419,7 +418,8 @@ def _analyze_variants_in_directive(pkg, constraint, directive, error_cls):
|
||||||
errors = []
|
errors = []
|
||||||
for name, v in constraint.variants.items():
|
for name, v in constraint.variants.items():
|
||||||
try:
|
try:
|
||||||
pkg.variants[name].validate_or_raise(v, pkg=pkg)
|
variant, _ = pkg.variants[name]
|
||||||
|
variant.validate_or_raise(v, pkg=pkg)
|
||||||
except variant_exceptions as e:
|
except variant_exceptions as e:
|
||||||
summary = pkg.name + ': wrong variant in "{0}" directive'
|
summary = pkg.name + ': wrong variant in "{0}" directive'
|
||||||
summary = summary.format(directive)
|
summary = summary.format(directive)
|
||||||
|
|
Loading…
Reference in a new issue