Save the updated registration

This commit is contained in:
Brad Warren
2016-05-25 16:41:19 -07:00
parent 14e2ea92ee
commit 5531c156e8
+3 -2
View File
@@ -396,9 +396,10 @@ def register(config, unused_plugins):
"required\n(hint: --email)")
acc, acme = _determine_account(config)
acme_client = client.Client(config, acc, None, None, acme=acme)
acme_client.acme.update_registration(acc.regr.update(
body=acc.regr.body.update(contact=('mailto:' + config.email,))))
# We rely on an exception to interrupt this process if it didn't work.
acc.regr = acme_client.acme.update_registration(acc.regr.update(
body=acc.regr.body.update(contact=('mailto:' + config.email,))))
account_storage.save_regr(account)
reporter_util = zope.component.getUtility(interfaces.IReporter)
msg = "Your e-mail address was updated to {0}.".format(config.email)
reporter_util.add_message(msg, reporter_util.MEDIUM_PRIORITY)