diff options
author | Rob Austein <sra@hactrn.net> | 2007-08-26 05:52:08 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-08-26 05:52:08 +0000 |
commit | 2bc2328e81e3552640b023d569101a582e7672be (patch) | |
tree | dc4840040c25abce30dcf6dd52e1369bf6431153 /scripts/rpki/https.py | |
parent | db3a70aa71f030676a8ce555c1af49d0acdd5efb (diff) |
Checkpoint
svn path=/scripts/irbe-cli.py; revision=916
Diffstat (limited to 'scripts/rpki/https.py')
-rw-r--r-- | scripts/rpki/https.py | 6 |
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.""" |