mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Merge branch 'master' of https://github.com/letsencrypt/lets-encrypt-preview
This commit is contained in:
@@ -19,9 +19,9 @@ def acme_object_validate(j):
|
|||||||
j = json.loads(j)
|
j = json.loads(j)
|
||||||
if not isinstance(j, dict):
|
if not isinstance(j, dict):
|
||||||
raise jsonschema.ValidationError("this is not a dictionary object")
|
raise jsonschema.ValidationError("this is not a dictionary object")
|
||||||
if not j.has_key("type"):
|
if "type" not in j:
|
||||||
raise jsonschema.ValidationError("missing type field")
|
raise jsonschema.ValidationError("missing type field")
|
||||||
if not schemata.has_key(j["type"]):
|
if j["type"] not in schemata:
|
||||||
raise jsonschema.ValidationError("unknown type %s" % j["type"])
|
raise jsonschema.ValidationError("unknown type %s" % j["type"])
|
||||||
jsonschema.validate(j, schemata[j["type"]])
|
jsonschema.validate(j, schemata[j["type"]])
|
||||||
|
|
||||||
|
|||||||
@@ -10,4 +10,3 @@ class Challenge(object):
|
|||||||
logger.error("Error - base class challenge.generate_response()")
|
logger.error("Error - base class challenge.generate_response()")
|
||||||
def clean(self):
|
def clean(self):
|
||||||
logger.error("Error - base class challenge.clean()")
|
logger.error("Error - base class challenge.clean()")
|
||||||
|
|
||||||
|
|||||||
@@ -688,7 +688,7 @@ class Client(object):
|
|||||||
def sanity_check_names(self, names):
|
def sanity_check_names(self, names):
|
||||||
for name in names:
|
for name in names:
|
||||||
if not self.is_hostname_sane(name):
|
if not self.is_hostname_sane(name):
|
||||||
logger.fatal(`name` + " is an impossible hostname")
|
logger.fatal(repr(name) + " is an impossible hostname")
|
||||||
sys.exit(81)
|
sys.exit(81)
|
||||||
|
|
||||||
def is_hostname_sane(self, hostname):
|
def is_hostname_sane(self, hostname):
|
||||||
|
|||||||
@@ -907,12 +907,12 @@ LogLevel warn \n\
|
|||||||
Enables mod_ssl
|
Enables mod_ssl
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
# Use check_output so the command will finish before reloading
|
# Use check_output so the command will finish before reloading
|
||||||
subprocess.check_call(["sudo", "a2enmod", mod_name], stdout=open("/dev/null", 'w'), stderr=open("/dev/null", 'w'))
|
subprocess.check_call(["sudo", "a2enmod", mod_name], stdout=open("/dev/null", 'w'), stderr=open("/dev/null", 'w'))
|
||||||
# Hopefully this waits for output
|
# Hopefully this waits for output
|
||||||
subprocess.check_call(["sudo", "/etc/init.d/apache2", "restart"], stdout=open("/dev/null", 'w'), stderr=open("/dev/null", 'w'))
|
subprocess.check_call(["sudo", "/etc/init.d/apache2", "restart"], stdout=open("/dev/null", 'w'), stderr=open("/dev/null", 'w'))
|
||||||
except:
|
except:
|
||||||
logger.error("Error enabling mod_" + mod_name)
|
logger.error("Error enabling mod_" + mod_name)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def fnmatch_to_re(self, cleanFNmatch):
|
def fnmatch_to_re(self, cleanFNmatch):
|
||||||
|
|||||||
@@ -168,8 +168,3 @@ if __name__ == "__main__":
|
|||||||
logger.error("errrrr")
|
logger.error("errrrr")
|
||||||
|
|
||||||
logger.trace("some trace data: %d - %f - %s" % (5, 8.3, 'cows'))
|
logger.trace("some trace data: %d - %f - %s" % (5, 8.3, 'cows'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,4 +43,3 @@ class Payment_Challenge(Challenge):
|
|||||||
|
|
||||||
def formatted_reasons(self):
|
def formatted_reasons(self):
|
||||||
return "\n\t* %s\n" % self.reason
|
return "\n\t* %s\n" % self.reason
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user