Example #1
0
 def process_pending(self, order_id, cancel=False):
     try:
         rsp = self._process_pending(order_id, cancel=cancel)
         return rsp.get_data().get('attributes')
     except errors.XCPError as e:
         if self._already_renewed(e):
             raise errors.DomainAlreadyRenewed(e)
         raise
Example #2
0
 def _capture(self, *args, **kwargs):
     try:
         return fn(self, *args, **kwargs)
     except errors.XCPError as e:
         # We cannot control domains which are automatically renewed on
         # OpenSRS side. Thus we always treat them as already renewed
         # for each renewal attempt.
         domain_name = args[0]
         if is_already_renewed(e) or is_auto_renewed(e, domain_name):
             raise errors.DomainAlreadyRenewed(e)
         raise
Example #3
0
 def renew_domain(self, domain, current_expiration_year, period):
     try:
         rsp = self._renew_domain(domain, current_expiration_year, period)
         return rsp.get_data()['attributes']['order_id']
     except errors.XCPError as e:
         # We cannot control domains which are automatically renewed on
         # OpenSRS side. Thus we always treat them as already renewed
         # for each renewal attempt.
         if self._already_renewed(e) or self._is_auto_renewed(e, domain):
             raise errors.DomainAlreadyRenewed(e)
         raise