File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -43,3 +43,4 @@ Experimental
43
43
Bug Fixes
44
44
~~~~~~~~~
45
45
- Bug in ``groupby`` signatures that didn't include *args or **kwargs (:issue:`8733`).
46
+ - ``io.data.Options`` now raises ``RemoteDataError`` when no expiry dates are available from Yahoo (:issue:`8761`).
Original file line number Diff line number Diff line change @@ -1132,10 +1132,13 @@ def _get_expiry_dates_and_links(self):
1132
1132
1133
1133
expiry_dates = [dt .datetime .strptime (element .text , "%B %d, %Y" ).date () for element in links ]
1134
1134
links = [element .attrib ['data-selectbox-link' ] for element in links ]
1135
+
1136
+ if len (expiry_dates ) == 0 :
1137
+ raise RemoteDataError ('Data not available' )
1138
+
1135
1139
expiry_links = dict (zip (expiry_dates , links ))
1136
1140
self ._expiry_links = expiry_links
1137
1141
self ._expiry_dates = expiry_dates
1138
-
1139
1142
return expiry_dates , expiry_links
1140
1143
1141
1144
def _parse_url (self , url ):
You can’t perform that action at this time.
0 commit comments