mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 06:25:04 +08:00
BUG: check that self.logger exists
`self.logger` is initialized as `None` and there is no guarantee that users have set it, so check that it exists before trying to pass messages to it.
This commit is contained in:
committed by
Eddie Hebert
parent
51c8a310be
commit
d00edbcf04
@@ -471,7 +471,8 @@ class TradingAlgorithm(object):
|
||||
zero_message = "Price of 0 for {psid}; can't infer value".format(
|
||||
psid=sid
|
||||
)
|
||||
self.logger.debug(zero_message)
|
||||
if self.logger:
|
||||
self.logger.debug(zero_message)
|
||||
# Don't place any order
|
||||
return
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user