| 522 | return True |
| 523 | |
| 524 | def await_error(self, domain, timeout=60, via_domain=None, use_https=True, errors=1): |
| 525 | try_until = time.time() + timeout |
| 526 | while True: |
| 527 | if time.time() >= try_until: |
| 528 | return False |
| 529 | md = self.get_md_status(domain, via_domain=via_domain, use_https=use_https) |
| 530 | if md: |
| 531 | if 'state' in md and md['state'] == MDTestEnv.MD_S_ERROR: |
| 532 | return md |
| 533 | if 'renewal' in md and 'errors' in md['renewal'] \ |
| 534 | and md['renewal']['errors'] >= errors: |
| 535 | return md |
| 536 | time.sleep(0.1) |
| 537 | |
| 538 | def await_file(self, fpath, timeout=60): |
| 539 | try_until = time.time() + timeout |