Skip to content

Commit 92a9541

Browse files
strategy/common: add broken attribute to Strategy
This is the first step to broken state tracking for strategies. A future commit will add a decorator to be used on the the strategy's transition()/force() method that actually sets the exception and raises it for subsequent calls Signed-off-by: Bastian Krause <[email protected]>
1 parent 4398da7 commit 92a9541

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

labgrid/strategy/common.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class Strategy(Driver): # reuse driver handling
2626

2727
def __attrs_post_init__(self):
2828
super().__attrs_post_init__()
29+
30+
# contains exception that broke the strategy or None
31+
self.broken = None
32+
2933
if self.target is None:
3034
raise BindingError(
3135
"Strategies can only be created on a valid target"

0 commit comments

Comments
 (0)