File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,8 @@ def erase(self, interrupt = True):
135135 del evals [self .id ]
136136 del evals_by_view [self .view .id ()][self .id ]
137137 if interrupt and self .status == "pending" and self .session :
138- cs_common .conn .send ({"op" : "interrupt" , "interrupt-id" : self .id , "session" : self .session })
138+ state = cs_common .get_state ()
139+ state .conn .send ({"op" : "interrupt" , "interrupt-id" : self .id , "session" : self .session })
139140
140141def by_id (id ):
141142 """
@@ -150,15 +151,15 @@ def by_region(view, region):
150151 """
151152 Find an eval touching region
152153 """
153- for eval in evals_by_view [view .id ()].values ():
154+ for eval in list ( evals_by_view [view .id ()].values () ):
154155 if cs_common .regions_touch (eval .region (), region ):
155156 return eval
156157
157158def by_status (view , status ):
158159 """
159160 Find evals by status
160161 """
161- return (eval for eval in evals_by_view [view .id ()].values () if eval .status == status )
162+ return (eval for eval in list ( evals_by_view [view .id ()].values () ) if eval .status == status )
162163
163164def erase_evals (predicate = lambda x : True , view = None ):
164165 """
You can’t perform that action at this time.
0 commit comments