Skip to content

Commit

Permalink
Compare idx type as well as value
Browse files Browse the repository at this point in the history
This prevents Python's handling of True == 1
  • Loading branch information
bremoran committed Jul 24, 2020
1 parent 73b9ab3 commit b5eb3d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion suit_tool/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def to_suit(self):
# Option 3: current & command not equal, command is dependency
# set dependency index
cidx = suitCommonInfo.component_id_to_index(i.cid)
if cidx != suitCommonInfo.current_index:
if type(cidx) != type(suitCommonInfo.current_index) or cidx != suitCommonInfo.current_index:
op = 'directive-set-component-index'
if isinstance(cidx, dependencyIndex):
op = 'directive-set-dependency-index'
Expand Down

0 comments on commit b5eb3d1

Please sign in to comment.