aboutsummaryrefslogtreecommitdiff
path: root/scripts/rpki
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rpki')
-rw-r--r--scripts/rpki/resource_set.py2
-rw-r--r--scripts/rpki/up_down.py17
2 files changed, 11 insertions, 8 deletions
diff --git a/scripts/rpki/resource_set.py b/scripts/rpki/resource_set.py
index 940f537e..e5fe2a50 100644
--- a/scripts/rpki/resource_set.py
+++ b/scripts/rpki/resource_set.py
@@ -151,7 +151,7 @@ class resource_set(list):
efficiently) as the basis for most set operations on resource
sets.
"""
- assert type(self) is type(other)
+ assert type(self) is type(other), "Type mismatch %s %s" % (repr(type(self)), repr(type(other)))
set1 = self[:]
set2 = other[:]
only1, only2, both = [], [], []
diff --git a/scripts/rpki/up_down.py b/scripts/rpki/up_down.py
index 4d29eb2b..c0c1b9e4 100644
--- a/scripts/rpki/up_down.py
+++ b/scripts/rpki/up_down.py
@@ -260,7 +260,7 @@ class issue_pdu(base_elt):
# Check current cert, if any
irdb_resources = rpki.left_right.irdb_query(gctx, child.self_id, child.child_id)
- rc_as, rc_v4, rc_v6 = ca_detail.latest_ca_cert.get_3779resources(irdb_resources)
+ rc_as, rc_v4, rc_v6 = ca_detail.latest_ca_cert.get_3779resources(*irdb_resources)
req_key = self.pkcs10.getPublicKey()
req_sia = self.pkcs10.get_SIA()
req_ski = self.pkcs10.get_SKI()
@@ -415,12 +415,15 @@ class error_response_pdu(base_elt):
def toXML(self):
"""Generate payload of "error_response" PDU."""
assert self.status in self.codes
- status_elt = self.make_elt("status")
- status_elt.text = str(self.status)
- description_elt = self.make_elt("description")
- description_elt.text = str(self.description)
- description_elt.set("xml:lang", "en")
- return [status_elt, description_elt]
+ elt = self.make_elt("status")
+ elt.text = str(self.status)
+ payload = [elt]
+ if self.description:
+ elt = self.make_elt("description")
+ elt.text = str(self.description)
+ elt.set("xml:lang", "en-US")
+ payload.append(elt)
+ return payload
def check_syntax(self):
"""Handle an error response. For the moment, just raise an