Skip to content

Commit

Permalink
fix ast_boolop truth test; see #438
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbarratt committed Feb 25, 2023
1 parent 31fc51e commit f77d859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/pyscript/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ async def ast_boolop(self, arg):
return val
for arg1 in arg.values:
val = await self.aeval(arg1)
if val != 0:
if val:
return val
return 0

Expand Down

0 comments on commit f77d859

Please sign in to comment.