Skip to content

Commit

Permalink
fix check_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Bielecki committed Apr 2, 2024
1 parent 2d58292 commit d5f00bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pdtable/io/parsers/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def check_encoding(cell_rows: Iterable[Sequence]) -> Iterable[Sequence]:
if isinstance(cell_rows, list):
cell_rows = iter(cell_rows)

first_cell_row = next(cell_rows)
try:
first_cell_row = next(cell_rows)
except StopIteration:
return # generator is empty, do not yield anything

if first_cell_row and len(first_cell_row) > 0 and first_cell_row[0]:
first_sign = first_cell_row[0][0]
Expand Down

0 comments on commit d5f00bd

Please sign in to comment.