mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-11-30 02:48:57 +08:00
增加仓库初始化异常保护及设置logging输出配置
This commit is contained in:
parent
428d33417e
commit
fbd0ba7d30
@ -48,6 +48,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)-15s [%(levelname)s] - %(message)s [%(name)s::%(funcName)s]'
|
||||
)
|
||||
|
||||
from .extend import *
|
||||
from .deprecated import *
|
||||
from .indicator import *
|
||||
|
@ -566,7 +566,10 @@ def get_part_name_list(house=None, part_type=None):
|
||||
|
||||
|
||||
# 初始化仓库
|
||||
HouseManager().setup_house()
|
||||
try:
|
||||
HouseManager().setup_house()
|
||||
except Exception as e:
|
||||
self.logger.warning("无法初始化 hikyuu 策略仓库,请检查网络连接! {}".format(e))
|
||||
|
||||
__all__ = [
|
||||
'add_remote_house',
|
||||
|
Loading…
Reference in New Issue
Block a user