From a81bd448501efeadcd5f5ab47917cbf8d9f73358 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 5 Aug 2014 21:06:11 +0200 Subject: [PATCH] conftype: Simplify URL checking for Proxy. --- qutebrowser/config/conftypes.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/qutebrowser/config/conftypes.py b/qutebrowser/config/conftypes.py index 34fe0493a..878acdf7b 100644 --- a/qutebrowser/config/conftypes.py +++ b/qutebrowser/config/conftypes.py @@ -972,16 +972,7 @@ class Proxy(BaseType): if not url.isValid(): raise ValidationError(value, "invalid url, {}".format( url.errorString())) - elif (url.isValid() and not url.isEmpty() and - url.scheme() in self.PROXY_TYPES): - if url.userName() and url.password(): - pass - elif not url.userName() and not url.password(): - pass - else: - raise ValidationError(value, "must either have user and " - "password or none of both") - else: + elif url.scheme() not in self.PROXY_TYPES: raise ValidationError(value, "must be a proxy URL (http://... or " "socks://...) or system/none!")