mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 22:08:07 -04:00
Remove separate NewAccount.
This commit is contained in:
parent
04cc1f4fa7
commit
6a8d78c5a3
2 changed files with 2 additions and 10 deletions
|
|
@ -92,18 +92,17 @@ class Client(object): # pylint: disable=too-many-instance-attributes
|
|||
def register(self, new_reg=None):
|
||||
"""Register.
|
||||
|
||||
:param .NewRegistration or .NewAccount new_reg:
|
||||
:param .NewRegistration new_reg:
|
||||
|
||||
:returns: Registration Resource.
|
||||
:rtype: `.RegistrationResource`
|
||||
|
||||
"""
|
||||
new_reg = messages.NewRegistration() if new_reg is None else new_reg
|
||||
if self.acme_version == 2:
|
||||
url = self.directory.new_account
|
||||
new_reg = messages.NewAccount() if new_reg is None else new_reg
|
||||
else:
|
||||
url = self.directory.new_reg
|
||||
new_reg = messages.NewRegistration() if new_reg is None else new_reg
|
||||
|
||||
response = self.net.post(url, new_reg)
|
||||
# TODO: handle errors
|
||||
|
|
|
|||
|
|
@ -288,13 +288,6 @@ class NewRegistration(Registration):
|
|||
resource = fields.Resource(resource_type)
|
||||
|
||||
|
||||
@Directory.register
|
||||
class NewAccount(Registration):
|
||||
"""New account."""
|
||||
resource_type = 'new-account' # not used
|
||||
resource = fields.Resource(resource_type)
|
||||
|
||||
|
||||
class UpdateRegistration(Registration):
|
||||
"""Update registration."""
|
||||
resource_type = 'reg'
|
||||
|
|
|
|||
Loading…
Reference in a new issue