Get the current block index, validating and checking status. Returns None if the demo is finished
(self,index)
| 345 | raise ValueError('invalid block index %s' % index) |
| 346 | |
| 347 | def _get_index(self,index): |
| 348 | """Get the current block index, validating and checking status. |
| 349 | |
| 350 | Returns None if the demo is finished""" |
| 351 | |
| 352 | if index is None: |
| 353 | if self.finished: |
| 354 | print('Demo finished. Use <demo_name>.reset() if you want to rerun it.') |
| 355 | return None |
| 356 | index = self.block_index |
| 357 | else: |
| 358 | self._validate_index(index) |
| 359 | return index |
| 360 | |
| 361 | def seek(self,index): |
| 362 | """Move the current seek pointer to the given block. |
no test coverage detected