BLD: for issue #121, fixed typo

This commit is contained in:
Frederic Fortier
2017-12-29 18:36:59 -05:00
parent 8ab3382f47
commit 24d7f52d46
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
get_order_attempts=5,
get_open_orders_attempts=5,
cancel_order_attempts=5,
get_stop_value_attempts=5,
get_spot_value_attempts=5,
get_history_window_attempts=5,
retry_sleeptime=5,
)
+2 -4
View File
@@ -1,5 +1,4 @@
import abc
from time import sleep
import numpy as np
import pandas as pd
@@ -12,7 +11,6 @@ from catalyst.data.data_portal import DataPortal
from catalyst.exchange.exchange_bundle import ExchangeBundle
from catalyst.exchange.exchange_errors import (
ExchangeRequestError,
ExchangeBarDataError,
PricingDataNotLoadedError)
from catalyst.exchange.utils.exchange_utils import get_frequency, \
resample_history_df, group_assets_by_exchange
@@ -29,7 +27,7 @@ class DataPortalExchangeBase(DataPortal):
self.retry_delay = 5
self.attempts = dict(
get_stop_value_attempts=5,
get_spot_value_attempts=5,
get_history_window_attempts=5,
retry_sleeptime=5,
)
@@ -165,7 +163,7 @@ class DataPortalExchangeBase(DataPortal):
return retry(
action=self._get_spot_value,
attempts=self.attempts['get_stop_value_attempts'],
attempts=self.attempts['get_spot_value_attempts'],
sleeptime=self.attempts['retry_sleeptime'],
retry_exceptions=(ExchangeRequestError,),
cleanup=lambda e: log.warn(