Skip to content

Commit

Permalink
input: fix layers error messages
Browse files Browse the repository at this point in the history
There were some remnants of the removed nested layers when generating
error messages. Addendum to 6f84d58.

Co-authored-by: Ralf Hubert <[email protected]>
  • Loading branch information
jkloetzke and rhubert committed Oct 21, 2024
1 parent c44dfd8 commit 73bde4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pym/bob/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,7 @@ def __init__(self, recipeSet, recipe, layer, sourceFile, baseDir, packageName, b
self.__layer = layer

sourceName = ("Recipe " if isRecipe else "Class ") + packageName + (
", layer "+"/".join(layer) if layer else "")
", layer "+ layer if layer else "")
incHelperBash = IncludeHelper(BashLanguage, recipeSet.loadBinary,
baseDir, packageName, sourceName).resolve
incHelperPwsh = IncludeHelper(PwshLanguage, recipeSet.loadBinary,
Expand Down Expand Up @@ -3567,7 +3567,7 @@ def __parseLayer(self, layerSpec, maxVer, recipesRoot):
minVer = config.get("bobMinimumVersion", "0.16")
if compareVersion(maxVer, minVer) < 0:
raise ParseError("Layer '{}' requires a higher Bob version than root project!"
.format("/".join(layer)))
.format(layer))
maxVer = minVer # sub-layers must not have a higher bobMinimumVersion

# Determine policies. The root layer determines the default settings
Expand All @@ -3577,7 +3577,7 @@ def __parseLayer(self, layerSpec, maxVer, recipesRoot):
for (name, behaviour) in config.get("policies", {}).items():
if bool(self.__policies[name][0]) != behaviour:
raise ParseError("Layer '{}' requires different behaviour for policy '{}' than root project!"
.format("/".join(layer), name))
.format(layer, name))
else:
self.__policies = self.calculatePolicies(config)

Expand Down

0 comments on commit 73bde4a

Please sign in to comment.