Skip to content

Commit

Permalink
Remove unnecessary use of a regex
Browse files Browse the repository at this point in the history
  • Loading branch information
scop authored and tobixen committed Oct 3, 2023
1 parent 7686694 commit 1b56016
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions caldav/davclient.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import logging
import re
from urllib.parse import unquote

import requests
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1b56016

Please sign in to comment.