mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-26 13:18:31 +08:00
Don't let record_variables be used after initialize.
This commit is contained in:
@@ -286,6 +286,9 @@ class TradingAlgorithm(object):
|
||||
if isinstance(names, basestring):
|
||||
names = [names]
|
||||
|
||||
if self.initialized:
|
||||
raise Exception(MESSAGES.ERRORS.CALL_RECORD_VARIABLES_POST_INIT)
|
||||
|
||||
self._registered_vars.update(set(names))
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user