(self)
| 832 | return u'\n'.join(msg) |
| 833 | |
| 834 | def __iter__(self): |
| 835 | for dp in self.ds: |
| 836 | # it is important to place this here! otherwise it mixes the output of multiple PrintData |
| 837 | if self.cnt == 0: |
| 838 | label = ' (%s)' % self.name if self.name is not None else "" |
| 839 | logger.info(colored("Contents of DataFlow%s:" % label, 'cyan')) |
| 840 | |
| 841 | if self.cnt < self.num: |
| 842 | print(self._get_msg(dp)) |
| 843 | self.cnt += 1 |
| 844 | yield dp |
| 845 | |
| 846 | def reset_state(self): |
| 847 | super(PrintData, self).reset_state() |