Browse Source

fixed authenticator to wait only once

issue #1
tags/v1.1.0
Robin Thoni 6 years ago
parent
commit
d5e61c2e4b
2 changed files with 7 additions and 3 deletions
  1. 4
    2
      certbot_pdns/PdnsApiAuthenticator.py
  2. 3
    1
      certbot_pdns/authenticator.py

+ 4
- 2
certbot_pdns/PdnsApiAuthenticator.py View File

81
         self.flush_zone(zone["name"])
81
         self.flush_zone(zone["name"])
82
         self.notify_zone(zone["name"])
82
         self.notify_zone(zone["name"])
83
 
83
 
84
+        return response
85
+
86
+    def wait_for_propagation(self, achalls):
87
+        # TODO search zones authoritative servers and check for TXT record on each of them
84
         # raw_input('Press <ENTER> to continue')
88
         # raw_input('Press <ENTER> to continue')
85
         logger.info("Waiting %i seconds..." % self.axfr_time)
89
         logger.info("Waiting %i seconds..." % self.axfr_time)
86
         time.sleep(self.axfr_time)
90
         time.sleep(self.axfr_time)
87
 
91
 
88
-        return response
89
-
90
     def cleanup(self, achall):
92
     def cleanup(self, achall):
91
         domain = achall.domain
93
         domain = achall.domain
92
         zone = self.find_best_matching_zone(domain)
94
         zone = self.find_best_matching_zone(domain)

+ 3
- 1
certbot_pdns/authenticator.py View File

49
         pass
49
         pass
50
 
50
 
51
     def perform(self, achalls):  # pylint: disable=missing-docstring
51
     def perform(self, achalls):  # pylint: disable=missing-docstring
52
-        return [self._perform_single(achall) for achall in achalls]
52
+        responses = [self._perform_single(achall) for achall in achalls]
53
+        self.backend.wait_for_propagation(achalls)
54
+        return responses
53
 
55
 
54
     def _perform_single(self, achall):
56
     def _perform_single(self, achall):
55
         response, validation = achall.response_and_validation()
57
         response, validation = achall.response_and_validation()

Loading…
Cancel
Save