# raise a readable exception if the computer name is already used,
# instead of an opaque 500 Internal Error.
# this will not work with the new API.
ifexc.getcode()==500:
error_body=exc.read()
if'Certificate still active.'inerror_body:
logger.error('The node name "%s" is already in use. Please change the name, or revoke the active certificate if you want to replace the node.'%node_name)
sys.exit(1)
raise
returnreq.read()
defparse_certificates(source):
defparse_certificates(source):
...
@@ -243,7 +259,7 @@ def do_register(conf):
...
@@ -243,7 +259,7 @@ def do_register(conf):
return1
return1
# Get source code of page having certificate and key
# Get source code of page having certificate and key