Skip to content

Commit

Permalink
don't crash on truncated files
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Feb 10, 2020
1 parent a4a0f5e commit 4765331
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions georinex/obs2.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ def _fast_alloc(fn: Union[TextIO, Path], Nl_sv: int) -> int:
else:
raise TypeError(f'Unknown filetype {type(fn)}')

ln = "" # in case of truncated file, don't crash
with opener(fn) as f:
_skip_header(f)
# %% find the first line with time (sometimes a blank line or two after header)
Expand Down

0 comments on commit 4765331

Please sign in to comment.