aboutsummaryrefslogtreecommitdiff
path: root/rpki/up_down.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-09-21 17:11:03 +0000
committerRob Austein <sra@hactrn.net>2014-09-21 17:11:03 +0000
commitfeadd1293e004d1acef12e39184cfdb1a280ea18 (patch)
treeae2188461fb0475719616b14b753d071560201ce /rpki/up_down.py
parent9f8c367eac5db1f28e11b187eb48ad37b0ab3797 (diff)
Move synchronous HTTP client code to library.
svn path=/branches/tk705/; revision=5965
Diffstat (limited to 'rpki/up_down.py')
-rw-r--r--rpki/up_down.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpki/up_down.py b/rpki/up_down.py
index 82abcebb..41f5ec2b 100644
--- a/rpki/up_down.py
+++ b/rpki/up_down.py
@@ -60,7 +60,7 @@ error_response_codes = {
2001 : "Internal Server Error - Request not performed" }
-def generate_error_response(r_pdu, status = 2001, description = None):
+def generate_error_response(r_msg, status = 2001, description = None):
"""
Generate an error response. If STATUS is given, it specifies the
numeric code to use, otherwise we default to "internal error".
@@ -69,7 +69,7 @@ def generate_error_response(r_pdu, status = 2001, description = None):
"""
assert status in error_response_codes
- del r_msg[:len(r_msg)]
+ del r_msg[:]
r_msg.set("type", "error_response")
SubElement(r_msg, tag_status).text = str(status)
se = SubElement(r_msg, tag_description)