diff options
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.""" |