Skip to content

Commit

Permalink
Slightly better debugging of rule nonmatches
Browse files Browse the repository at this point in the history
  • Loading branch information
texttheater committed Jul 15, 2021
1 parent b2d6a7d commit 202e319
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions produce
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def create_irule(target, rules, globes):
loke = attribute.split('.')[-1]
if loke == 'target':
raise ProduceError('cannot overwrite "target" attribute '
'in rule for {}'.format(target))
'in rule for {}'.format(target))
# Do expansions in value:
iv = interpolate(value, varz)
# Attribute retains prefix:
Expand All @@ -477,8 +477,8 @@ def create_irule(target, rules, globes):
break
# If there is a condition and it isn't met, go to the next rule:
if 'cond' in result and not ast.literal_eval(result['cond']):
debug(3, 'condition %s failed, trying next rule',
result['cond'])
debug(3, 'condition %s failed for pattern %s, trying next '
'rule', result['cond'], pattern)
continue
debug(4, 'instantiated rule for target %s has varz: %s', target,
{k: v for (k, v) in varz.items() if k != '__builtins__'})
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = produce
version = 0.4.7
version = 0.5.0
author = Kilian Evang
author_email = kilian.evang@gmail.com
url = https://github.com/texttheater/produce
Expand Down

0 comments on commit 202e319

Please sign in to comment.