aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/https.py
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid/rpki/https.py')
-rw-r--r--rpkid/rpki/https.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/rpkid/rpki/https.py b/rpkid/rpki/https.py
index dd664170..7f805377 100644
--- a/rpkid/rpki/https.py
+++ b/rpkid/rpki/https.py
@@ -167,12 +167,13 @@ def client(msg, client_key, client_cert, server_ta, url, timeout = 300, callback
u = urlparse.urlparse(url)
- assert u.scheme in ("", "https") and \
- u.username is None and \
- u.password is None and \
- u.params == "" and \
- u.query == "" and \
- u.fragment == ""
+ if (u.scheme not in ("", "https") or
+ u.username is not None or
+ u.password is not None or
+ u.params != "" or
+ u.query != "" or
+ u.fragment != ""):
+ raise rpki.exceptions.BadClientURL, "Unusable URL %s" % url
rpki.log.debug("Contacting %s" % url)