Skip to content

Commit

Permalink
show: fix crash with checkoutAssert
Browse files Browse the repository at this point in the history
Fix a regression of 0c40313:

     File "pym/bob/cmds/show.py", line 54, in <listcomp>
       { k:v for k,v in a.getProperties().items() if not k.startswith("__") }
                        ^^^^^^^^^^^^^^^
   AttributeError: 'dict' object has no attribute 'getProperties'

and add a test for this.
  • Loading branch information
rhubert committed Jun 18, 2024
1 parent 2a42a1a commit b1522bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pym/bob/cmds/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def dumpPackage(package):
for s in checkoutStep.getScmList()
]
doc["checkoutAssert"] = [
{ k:v for k,v in a.getProperties().items() if not k.startswith("__") }
{ k:v for k,v in a.items() if not k.startswith("__") }
for a in recipe.checkoutAsserts
]
doc["checkoutTools"] = {
Expand Down
7 changes: 7 additions & 0 deletions test/black-box/show/recipes/dep.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
checkoutScript: |
echo "foo" > test
checkoutAssert:
- file: test
digestSHA1: f1d2d2f924e986ac86fdf7b36c94bcdf32beec15

packageScript: |
some dependency

0 comments on commit b1522bd

Please sign in to comment.