From 1b5601613bbf7d41b20c3e598c162f951639bdad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 3 Oct 2023 22:15:47 +0300 Subject: [PATCH] Remove unnecessary use of a regex --- caldav/davclient.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/caldav/davclient.py b/caldav/davclient.py index 57a1085f..8d9291f5 100644 --- a/caldav/davclient.py +++ b/caldav/davclient.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- import logging -import re from urllib.parse import unquote import requests @@ -361,7 +360,7 @@ def __init__( if proxy is not None: self.proxy = proxy # requests library expects the proxy url to have a scheme - if re.match("^.*://", proxy) is None: + if "://" not in proxy: self.proxy = self.url.scheme + "://" + proxy # add a port is one is not specified