Skip to content

Commit

Permalink
fix usage of Item.display_dicts()
Browse files Browse the repository at this point in the history
  • Loading branch information
trehn committed Oct 1, 2017
1 parent 2708d7c commit 1b18009
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bundlewrap/items/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,21 +537,20 @@ def apply(
status_after = self.get_status(cached=False)
status_code = self.STATUS_FIXED if status_after.correct else self.STATUS_FAILED

if status_code == self.STATUS_SKIPPED:
if status_code in (self.STATUS_OK, self.STATUS_SKIPPED):
# can't use else for this because status_before is None
changes = keys_to_fix
elif status_before.must_be_created:
changes = True
elif status_before.must_be_deleted:
changes = False
elif status_code == self.STATUS_FAILED:
else:
changes = self.display_dicts(
self.cached_cdict.copy(),
status_after.sdict.copy(),
status_after.keys_to_fix[:],
status_after.keys_to_fix[:] if status_after.keys_to_fix
else status_before.keys_to_fix,
)[2]
else:
changes = keys_to_fix

self.node.repo.hooks.item_apply_end(
self.node.repo,
Expand Down

0 comments on commit 1b18009

Please sign in to comment.