Clean up all progress bars. Should be called in finally blocks.
(self)
| 170 | self.completed_phases += 1 |
| 171 | |
| 172 | def cleanup(self): |
| 173 | """Clean up all progress bars. Should be called in finally blocks.""" |
| 174 | if self.phase_progress: |
| 175 | try: |
| 176 | self.phase_progress.close() |
| 177 | except (AttributeError, TypeError): |
| 178 | pass |
| 179 | self.phase_progress = None |
| 180 | if self.overall_progress: |
| 181 | try: |
| 182 | self.overall_progress.close() |
| 183 | except (AttributeError, TypeError): |
| 184 | pass |
| 185 | self.overall_progress = None |