aboutsummaryrefslogtreecommitdiff
path: root/scripts/rpki/https.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-08-26 05:52:08 +0000
committerRob Austein <sra@hactrn.net>2007-08-26 05:52:08 +0000
commit2bc2328e81e3552640b023d569101a582e7672be (patch)
treedc4840040c25abce30dcf6dd52e1369bf6431153 /scripts/rpki/https.py
parentdb3a70aa71f030676a8ce555c1af49d0acdd5efb (diff)
Checkpoint
svn path=/scripts/irbe-cli.py; revision=916
Diffstat (limited to 'scripts/rpki/https.py')
-rw-r--r--scripts/rpki/https.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/rpki/https.py b/scripts/rpki/https.py
index fe2d404b..1ac5ff45 100644
--- a/scripts/rpki/https.py
+++ b/scripts/rpki/https.py
@@ -28,8 +28,10 @@ def client(msg, privateKey, certChain, x509TrustList, host="localhost", port=443
httpc.connect()
httpc.request("POST", url, msg, {"Content-Type" : rpki_content_type})
response = httpc.getresponse()
- assert response.status == httplib.OK
- return response.read()
+ if response.status == httplib.OK:
+ return response.read()
+ else:
+ raise RuntimeError, response.read()
class requestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Derived type to supply POST handler."""