From 36f5052c26e89a121d57aae40205b21616206ac5 Mon Sep 17 00:00:00 2001 From: Alec Muffett Date: Sat, 16 Nov 2019 19:55:57 +0000 Subject: [PATCH] commit: small sanity check --- rwos-db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rwos-db.py b/rwos-db.py index 318a6ca..40fea67 100755 --- a/rwos-db.py +++ b/rwos-db.py @@ -127,6 +127,8 @@ class Database: class URL: def __init__(self, url): + if not (url.startswith('http://') or url.startswith('https://')): + raise RuntimeError('not a proper url: ' + url) self.url = url self.attempt = 0 self.last_code = None