Skip to content

Commit fdf58a9

Browse files
committed
fix: proper exception chaining
1 parent 34a989c commit fdf58a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

epo_ops/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ def validate_date(date):
3535
try:
3636
datetime.strptime(date, "%Y%m%d")
3737
return date
38-
except ValueError:
39-
raise InvalidDate("{0} is not a valid YYYYMMDD date.".format(date))
38+
except ValueError as exc:
39+
raise InvalidDate("{0} is not a valid YYYYMMDD date.".format(date)) from exc

0 commit comments

Comments
 (0)