summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2020-09-08 15:34:59 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2020-09-08 15:34:59 -0400
commit2656a785c2f1b941e52787684a0609405dc8e8c3 (patch)
tree110c6a934d4e4660f1547f6599b16ae9cffba180
parent4991a8dcd67eb8c65332a9a0f8558e8e46c22b7c (diff)
downloadpyisda-2656a785c2f1b941e52787684a0609405dc8e8c3.tar.gz
raise in case of None
-rw-r--r--pyisda/date.pyx2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyisda/date.pyx b/pyisda/date.pyx
index 72a1413..2a31ef2 100644
--- a/pyisda/date.pyx
+++ b/pyisda/date.pyx
@@ -12,6 +12,8 @@ c_datetime.import_datetime()
cdef int SUCCESS = 0
cpdef TDate pydate_to_TDate(c_datetime.date d):
+ if d is None:
+ raise ValueError("date is None")
return JpmcdsDate(date_year(d), date_month(d), date_day(d))
cpdef c_datetime.date TDate_to_pydate(TDate d):