Skip to content

Commit

Permalink
[Fix] 增加错误返回
Browse files Browse the repository at this point in the history
  • Loading branch information
Edanflame committed Nov 17, 2021
1 parent 3b473f7 commit df2a04f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vnpy_tushare/tushare_datafeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ def query_bar_history(self, req: HistoryRequest) -> Optional[List[BarData]]:
end = req.end.strftime("%Y%m%d")

ts_symbol = to_ts_symbol(symbol, exchange)
if not ts_symbol:
return None

asset = to_ts_asset(symbol, exchange)
if not asset:
return None

ts_interval = INTERVAL_VT2TS.get(interval)
if not ts_interval:
Expand Down

0 comments on commit df2a04f

Please sign in to comment.