From f159b61057177e0adbc746eb933e412e03de91d1 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Wed, 10 Jun 2020 21:50:04 +0800 Subject: [PATCH] [bug fix] --- vnpy/trader/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnpy/trader/utility.py b/vnpy/trader/utility.py index f37b826a..fef74bca 100644 --- a/vnpy/trader/utility.py +++ b/vnpy/trader/utility.py @@ -74,7 +74,7 @@ def get_underlying_symbol(symbol: str): p = re.compile(r"([A-Z]+)[0-9]+", re.I) underlying_symbol = p.match(symbol) - if underlying_symbol is None or len(underlying_symbol) == 0: + if underlying_symbol is None: return symbol return underlying_symbol.group(1)