Skip to content

Commit

Permalink
Cleaner break logic
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Wilkins <[email protected]>
  • Loading branch information
ajjackson and oerc0122 committed Sep 6, 2023
1 parent 293b9bb commit a9b31bb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions euphonic/readers/castep.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,9 @@ def _read_frequency_blocks(*args, **kwargs) -> Iterator[_FrequencyBlock]:
"""Iterate over frequency blocks"""
while True:
frequency_block = _read_frequency_block(*args, **kwargs)
if frequency_block:
yield frequency_block
else:
if frequency_block is None:
break
yield frequency_block


def read_interpolation_data(
Expand Down

0 comments on commit a9b31bb

Please sign in to comment.