##// END OF EJS Templates
Fix MPDecorator (check flagNoData for all type of operations)
Juan C. Espinoza -
r1198:f0bf03007c43
parent child
Show More
@@ -191,6 +191,7 def MPDecorator(BaseClass):
191 191 self.receiver = None
192 192 self.name = BaseClass.__name__
193 193 if 'plot' in self.name.lower():
194 if not self.name.endswith('_'):
194 195 self.name = '{}{}'.format(self.CODE.upper(), 'Plot')
195 196 self.start_time = time.time()
196 197
@@ -252,9 +253,9 def MPDecorator(BaseClass):
252 253 BaseClass.run(self, **self.kwargs)
253 254
254 255 for op, optype, opId, kwargs in self.operations:
255 if optype == 'self':
256 if optype == 'self' and not self.dataOut.flagNoData:
256 257 op(**kwargs)
257 elif optype == 'other':
258 elif optype == 'other' and not self.dataOut.flagNoData:
258 259 self.dataOut = op.run(self.dataOut, **self.kwargs)
259 260 elif optype == 'external':
260 261 self.publish(self.dataOut, opId)
@@ -289,15 +290,17 def MPDecorator(BaseClass):
289 290 self.dataOut.flagNoData = True
290 291
291 292 for op, optype, opId, kwargs in self.operations:
292 if optype == 'self':
293 if optype == 'self' and not self.dataOut.flagNoData:
293 294 op(**kwargs)
294 elif optype == 'other':
295 elif optype == 'other' and not self.dataOut.flagNoData:
295 296 self.dataOut = op.run(self.dataOut, **kwargs)
296 297 elif optype == 'external':
297 298 if not self.dataOut.flagNoData or self.dataOut.error:
298 299 self.publish(self.dataOut, opId)
299 300
301 if not self.dataOut.flagNoData or self.dataOut.error:
300 302 self.publish(self.dataOut, self.id)
303
301 304 if self.dataIn.error:
302 305 break
303 306
General Comments 0
You need to be logged in to leave comments. Login now