Skip to content

Commit 81a4aff

Browse files
committed
fix: raise ValueError for unrecognized IGRA time format and drop unused sys import
1 parent 3d2bcb2 commit 81a4aff

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/siphon/simplewebservice/igra2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import datetime
77
from io import BytesIO, StringIO
88
import itertools
9-
import sys
109
import warnings
1110
from zipfile import ZipFile
1211

@@ -215,7 +214,7 @@ def _ctime_strformat(val):
215214
minutes = int(time[2:4])
216215
time_seconds = hours * 3600 + minutes * 60
217216
else:
218-
sys.exit('Unrecognized time format')
217+
raise ValueError(f'Unrecognized time format "{strformat}"')
219218

220219
return time_seconds
221220
return _ctime_strformat

0 commit comments

Comments
 (0)