Update ACME error namespace to match the new draft. (#3469)

* Update error namespace in acme package.

* Use new error namespace in certbot.

* fix lint and py26 errors.

* Update with_code docstring.

* @pde's suggestions
This commit is contained in:
Blake Griffith
2016-10-12 14:46:02 -07:00
committed by Peter Eckersley
parent f008fd0af9
commit 7773568332
8 changed files with 100 additions and 45 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ def perform_registration(acme, config):
try:
return acme.register(messages.NewRegistration.from_data(email=config.email))
except messages.Error as e:
if e.typ == "urn:acme:error:invalidEmail" or e.typ == "urn:acme:error:invalidContact":
if e.code == "invalidEmail" or e.code == "invalidContact":
if config.noninteractive_mode:
msg = ("The ACME server believes %s is an invalid email address. "
"Please ensure it is a valid email and attempt "