This commit is contained in:
Stavros Korokithakis
2014-11-19 04:01:57 +02:00
7 changed files with 7 additions and 14 deletions
+2 -2
View File
@@ -19,9 +19,9 @@ def acme_object_validate(j):
j = json.loads(j)
if not isinstance(j, dict):
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")
if not schemata.has_key(j["type"]):
if j["type"] not in schemata:
raise jsonschema.ValidationError("unknown type %s" % j["type"])
jsonschema.validate(j, schemata[j["type"]])
-1
View File
@@ -10,4 +10,3 @@ class Challenge(object):
logger.error("Error - base class challenge.generate_response()")
def clean(self):
logger.error("Error - base class challenge.clean()")
+1 -1
View File
@@ -688,7 +688,7 @@ class Client(object):
def sanity_check_names(self, names):
for name in names:
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)
def is_hostname_sane(self, hostname):
-5
View File
@@ -168,8 +168,3 @@ if __name__ == "__main__":
logger.error("errrrr")
logger.trace("some trace data: %d - %f - %s" % (5, 8.3, 'cows'))
-1
View File
@@ -43,4 +43,3 @@ class Payment_Challenge(Challenge):
def formatted_reasons(self):
return "\n\t* %s\n" % self.reason